Merge
authordsamersoff
Mon, 10 Aug 2015 14:05:37 +0300
changeset 32221 2d0aa67d905f
parent 32220 602c828cf7dc (current diff)
parent 32104 17bed8d40800 (diff)
child 32223 e16dba4d07ee
Merge
jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java
--- a/jdk/.hgtags	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/.hgtags	Mon Aug 10 14:05:37 2015 +0300
@@ -318,3 +318,4 @@
 1c8bca2ebba13948199de33a1b71e2d6f1c7a8a6 jdk9-b73
 6dd82d2e4a104f4d204b2890f33ef11ec3e3f8d0 jdk9-b74
 4dd09cb5f7c2a2a23a9958ea7a602dd74d5709b2 jdk9-b75
+4526c0da8fb362eebd7e88f4d44e86858cf9b80b jdk9-b76
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/CopyInterimCLDRConverter.gmk	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+##########################################################################################
+
+### CLDRConverter needs the JRE time zone names from the java.base source.
+
+define cldrconverter_copytznames
+	$(MKDIR) -p '$(@D)'
+	$(RM) '$@'
+	$(SED) -e "s/package sun.util.resources/package build.tools.cldrconverter/" \
+        -e "s/extends TimeZoneNamesBundle//" \
+        -e "s/protected final/static final/" \
+        < $(<) > $@
+endef
+
+$(eval $(call SetupCopyFiles,COPY_INTERIM_CLDRCONVERTER, \
+    SRC := $(JDK_TOPDIR)/src/java.base/share/classes/sun/util/resources, \
+    DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes/build/tools/cldrconverter, \
+    FILES := TimeZoneNames.java, \
+    MACRO := cldrconverter_copytznames))
+    
+##########################################################################################
+
+all: $(COPY_INTERIM_CLDRCONVERTER)
--- a/jdk/make/Tools.gmk	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/make/Tools.gmk	Mon Aug 10 14:05:37 2015 +0300
@@ -38,8 +38,8 @@
 
 $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
     SETUP := GENERATE_OLDBYTECODE, \
-    ADD_JAVAC_FLAGS := "-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes", \
-    SRC := $(JDK_TOPDIR)/make/src/classes, \
+    ADD_JAVAC_FLAGS := "-Xbootclasspath/p:$(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes$(PATH_SEP)$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes", \
+    SRC := $(JDK_TOPDIR)/make/src/classes $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes, \
     BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
     COPY := boot.modules ext.modules))
 
--- a/jdk/make/mapfiles/libnio/mapfile-linux	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/make/mapfiles/libnio/mapfile-linux	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -135,9 +135,7 @@
 		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
 		Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
 		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
-		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
-		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
-		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGnomeVfs;
+		Java_sun_nio_fs_GnomeFileTypeDetector_probeGio;
 		Java_sun_nio_fs_MagicFileTypeDetector_initialize0;
 		Java_sun_nio_fs_MagicFileTypeDetector_probe0;
 		Java_sun_nio_fs_LinuxWatchService_eventSize;
--- a/jdk/make/mapfiles/libnio/mapfile-solaris	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/make/mapfiles/libnio/mapfile-solaris	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -130,9 +130,7 @@
 		Java_sun_nio_ch_SolarisEventPort_port_1getn;
 		Java_sun_nio_ch_SolarisEventPort_port_1send;
 		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
-		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
-		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
-		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGnomeVfs;
+		Java_sun_nio_fs_GnomeFileTypeDetector_probeGio;
 		Java_sun_nio_fs_UnixNativeDispatcher_init;
 		Java_sun_nio_fs_UnixNativeDispatcher_getcwd;
 		Java_sun_nio_fs_UnixNativeDispatcher_strerror;
--- a/jdk/make/src/classes/build/tools/cldrconverter/Bundle.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/make/src/classes/build/tools/cldrconverter/Bundle.java	Mon Aug 10 14:05:37 2015 +0300
@@ -27,12 +27,15 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Enumeration;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
+import java.util.ResourceBundle;
 
 class Bundle {
     static enum Type {
@@ -145,6 +148,13 @@
         return id;
     }
 
+    String getJavaID() {
+        // Tweak ISO compatibility for bundle generation
+        return id.replaceFirst("^he", "iw")
+            .replaceFirst("^id", "in")
+            .replaceFirst("^yi", "ji");
+    }
+
     boolean isRoot() {
         return "root".equals(id);
     }
@@ -298,8 +308,8 @@
                     continue;
                 }
 
-                if (id.startsWith("en")) {
-                    fillInAbbrs(key, nameMap);
+                if (id.equals("en")) {
+                    fillInJREs(key, nameMap);
                 }
             }
         }
@@ -381,7 +391,8 @@
         if (Objects.nonNull(parentsMap)) {
             for (Iterator<String> it = myMap.keySet().iterator(); it.hasNext();) {
                 String key = it.next();
-                if (Objects.deepEquals(parentsMap.get(key), myMap.get(key))) {
+                if (!key.equals("numberingScripts") && // real body "NumberElements" may differ
+                    Objects.deepEquals(parentsMap.get(key), myMap.get(key))) {
                     it.remove();
                 }
             }
@@ -621,78 +632,41 @@
         return null;
     }
 
-    private void fillInAbbrs(String key, Map<String, String> map) {
-        fillInAbbrs(TZ_STD_LONG_KEY, TZ_STD_SHORT_KEY, map);
-        fillInAbbrs(TZ_DST_LONG_KEY, TZ_DST_SHORT_KEY, map);
-        fillInAbbrs(TZ_GEN_LONG_KEY, TZ_GEN_SHORT_KEY, map);
+    static Object[][] jreTimeZoneNames = TimeZoneNames.getContents();
+    private void fillInJREs(String key, Map<String, String> map) {
+        String tzid = null;
 
-        // If the standard std is "Standard Time" and daylight std is "Summer Time",
-        // replace the standard std with the generic std to avoid using
-        // the same abbrivation except for Australia time zone names.
-        String std = map.get(TZ_STD_SHORT_KEY);
-        String dst = map.get(TZ_DST_SHORT_KEY);
-        String gen = map.get(TZ_GEN_SHORT_KEY);
-        if (std != null) {
-            if (dst == null) {
-                // if dst is null, create long and short names from the standard
-                // std. ("Something Standard Time" to "Something Daylight Time",
-                // or "Something Time" to "Something Summer Time")
-                String name = map.get(TZ_STD_LONG_KEY);
-                if (name != null) {
-                    if (name.contains("Standard Time")) {
-                        name = name.replace("Standard Time", "Daylight Time");
-                    } else if (name.endsWith("Mean Time")) {
-                        if (!name.startsWith("Greenwich ")) {
-                        name = name.replace("Mean Time", "Summer Time");
+        if (key.startsWith(CLDRConverter.METAZONE_ID_PREFIX)) {
+            // Look for tzid
+            String meta = key.substring(CLDRConverter.METAZONE_ID_PREFIX.length());
+            if (meta.equals("GMT")) {
+                tzid = meta;
+            } else {
+                for (String tz : CLDRConverter.handlerMetaZones.keySet()) {
+                    if (CLDRConverter.handlerMetaZones.get(tz).equals(meta)) {
+                        tzid = tz;
+                        break;
                         }
-                    } else if (name.endsWith(" Time")) {
-                        name = name.replace(" Time", " Summer Time");
                     }
-                    map.put(TZ_DST_LONG_KEY, name);
-                    fillInAbbrs(TZ_DST_LONG_KEY, TZ_DST_SHORT_KEY, map);
+                }
+        } else {
+            tzid = key.substring(CLDRConverter.TIMEZONE_ID_PREFIX.length());
+    }
+
+        if (tzid != null) {
+            for (Object[] jreZone : jreTimeZoneNames) {
+                if (jreZone[0].equals(tzid)) {
+                    for (int i = 0; i < ZONE_NAME_KEYS.length; i++) {
+                        if (map.get(ZONE_NAME_KEYS[i]) == null) {
+                            String[] jreNames = (String[])jreZone[1];
+                            map.put(ZONE_NAME_KEYS[i], jreNames[i]);
                 }
             }
-            if (gen  == null) {
-                String name = map.get(TZ_STD_LONG_KEY);
-                if (name != null) {
-                    if (name.endsWith("Standard Time")) {
-                        name = name.replace("Standard Time", "Time");
-                    } else if (name.endsWith("Mean Time")) {
-                        if (!name.startsWith("Greenwich ")) {
-                        name = name.replace("Mean Time", "Time");
-                    }
-                    }
-                    map.put(TZ_GEN_LONG_KEY, name);
-                    fillInAbbrs(TZ_GEN_LONG_KEY, TZ_GEN_SHORT_KEY, map);
-                }
-            }
+                    break;
         }
     }
-
-    private void fillInAbbrs(String longKey, String shortKey, Map<String, String> map) {
-        String abbr = map.get(shortKey);
-        if (abbr == null) {
-            String name = map.get(longKey);
-            if (name != null) {
-                abbr = toAbbr(name);
-                if (abbr != null) {
-                    map.put(shortKey, abbr);
-                }
             }
         }
-    }
-
-    private String toAbbr(String name) {
-        String[] substrs = name.split("\\s+");
-        StringBuilder sb = new StringBuilder();
-        for (String s : substrs) {
-            char c = s.charAt(0);
-            if (c >= 'A' && c <= 'Z') {
-                sb.append(c);
-            }
-        }
-        return sb.length() > 0 ? sb.toString() : null;
-    }
 
     private void convert(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
         switch (cldrLetter) {
--- a/jdk/make/src/classes/build/tools/cldrconverter/CLDRConverter.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/make/src/classes/build/tools/cldrconverter/CLDRConverter.java	Mon Aug 10 14:05:37 2015 +0300
@@ -433,35 +433,35 @@
                 Map<String, Object> localeNamesMap = extractLocaleNames(targetMap, bundle.getID());
                 if (!localeNamesMap.isEmpty() || bundle.isRoot()) {
                     metaInfo.get("LocaleNames").add(toLanguageTag(bundle.getID()));
-                    bundleGenerator.generateBundle("util", "LocaleNames", bundle.getID(), true, localeNamesMap, BundleType.OPEN);
+                    bundleGenerator.generateBundle("util", "LocaleNames", bundle.getJavaID(), true, localeNamesMap, BundleType.OPEN);
                 }
             }
             if (bundleTypes.contains(Bundle.Type.CURRENCYNAMES)) {
                 Map<String, Object> currencyNamesMap = extractCurrencyNames(targetMap, bundle.getID(), bundle.getCurrencies());
                 if (!currencyNamesMap.isEmpty() || bundle.isRoot()) {
                     metaInfo.get("CurrencyNames").add(toLanguageTag(bundle.getID()));
-                    bundleGenerator.generateBundle("util", "CurrencyNames", bundle.getID(), true, currencyNamesMap, BundleType.OPEN);
+                    bundleGenerator.generateBundle("util", "CurrencyNames", bundle.getJavaID(), true, currencyNamesMap, BundleType.OPEN);
                 }
             }
             if (bundleTypes.contains(Bundle.Type.TIMEZONENAMES)) {
                 Map<String, Object> zoneNamesMap = extractZoneNames(targetMap, bundle.getID());
                 if (!zoneNamesMap.isEmpty() || bundle.isRoot()) {
                     metaInfo.get("TimeZoneNames").add(toLanguageTag(bundle.getID()));
-                    bundleGenerator.generateBundle("util", "TimeZoneNames", bundle.getID(), true, zoneNamesMap, BundleType.TIMEZONE);
+                    bundleGenerator.generateBundle("util", "TimeZoneNames", bundle.getJavaID(), true, zoneNamesMap, BundleType.TIMEZONE);
                 }
             }
             if (bundleTypes.contains(Bundle.Type.CALENDARDATA)) {
                 Map<String, Object> calendarDataMap = extractCalendarData(targetMap, bundle.getID());
                 if (!calendarDataMap.isEmpty() || bundle.isRoot()) {
                     metaInfo.get("CalendarData").add(toLanguageTag(bundle.getID()));
-                    bundleGenerator.generateBundle("util", "CalendarData", bundle.getID(), true, calendarDataMap, BundleType.PLAIN);
+                    bundleGenerator.generateBundle("util", "CalendarData", bundle.getJavaID(), true, calendarDataMap, BundleType.PLAIN);
                 }
             }
             if (bundleTypes.contains(Bundle.Type.FORMATDATA)) {
                 Map<String, Object> formatDataMap = extractFormatData(targetMap, bundle.getID());
                 if (!formatDataMap.isEmpty() || bundle.isRoot()) {
                     metaInfo.get("FormatData").add(toLanguageTag(bundle.getID()));
-                    bundleGenerator.generateBundle("text", "FormatData", bundle.getID(), true, formatDataMap, BundleType.PLAIN);
+                    bundleGenerator.generateBundle("text", "FormatData", bundle.getJavaID(), true, formatDataMap, BundleType.PLAIN);
                 }
             }
 
--- a/jdk/make/src/classes/build/tools/cldrconverter/LDMLParseHandler.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/make/src/classes/build/tools/cldrconverter/LDMLParseHandler.java	Mon Aug 10 14:05:37 2015 +0300
@@ -27,6 +27,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.text.DateFormatSymbols;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -900,6 +901,12 @@
                 Entry<?> entry = (Entry<?>) currentContainer;
                 Object value = entry.getValue();
                 if (value != null) {
+                    String key = entry.getKey();
+                    // Tweak for MonthNames for the root locale, Needed for
+                    // SimpleDateFormat.format()/parse() roundtrip.
+                    if (id.equals("root") && key.startsWith("MonthNames")) {
+                        value = new DateFormatSymbols(Locale.US).getShortMonths();
+                    }
                     put(entry.getKey(), value);
                 }
             }
--- a/jdk/src/java.base/share/classes/java/io/BufferedOutputStream.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/BufferedOutputStream.java	Mon Aug 10 14:05:37 2015 +0300
@@ -42,8 +42,8 @@
 
     /**
      * The number of valid bytes in the buffer. This value is always
-     * in the range <tt>0</tt> through <tt>buf.length</tt>; elements
-     * <tt>buf[0]</tt> through <tt>buf[count-1]</tt> contain valid
+     * in the range {@code 0} through {@code buf.length}; elements
+     * {@code buf[0]} through {@code buf[count-1]} contain valid
      * byte data.
      */
     protected int count;
--- a/jdk/src/java.base/share/classes/java/io/BufferedReader.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/BufferedReader.java	Mon Aug 10 14:05:37 2015 +0300
@@ -170,7 +170,7 @@
      * Reads a single character.
      *
      * @return The character read, as an integer in the range
-     *         0 to 65535 (<tt>0x00-0xffff</tt>), or -1 if the
+     *         0 to 65535 ({@code 0x00-0xffff}), or -1 if the
      *         end of the stream has been reached
      * @exception  IOException  If an I/O error occurs
      */
--- a/jdk/src/java.base/share/classes/java/io/BufferedWriter.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/BufferedWriter.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,7 +34,7 @@
  * The default is large enough for most purposes.
  *
  * <p> A newLine() method is provided, which uses the platform's own notion of
- * line separator as defined by the system property <tt>line.separator</tt>.
+ * line separator as defined by the system property {@code line.separator}.
  * Not all platforms use the newline character ('\n') to terminate lines.
  * Calling this method to terminate each output line is therefore preferred to
  * writing a newline character directly.
@@ -195,7 +195,7 @@
     /**
      * Writes a portion of a String.
      *
-     * <p> If the value of the <tt>len</tt> parameter is negative then no
+     * <p> If the value of the {@code len} parameter is negative then no
      * characters are written.  This is contrary to the specification of this
      * method in the {@linkplain java.io.Writer#write(java.lang.String,int,int)
      * superclass}, which requires that an {@link IndexOutOfBoundsException} be
@@ -225,7 +225,7 @@
 
     /**
      * Writes a line separator.  The line separator string is defined by the
-     * system property <tt>line.separator</tt>, and is not necessarily a single
+     * system property {@code line.separator}, and is not necessarily a single
      * newline ('\n') character.
      *
      * @exception  IOException  If an I/O error occurs
--- a/jdk/src/java.base/share/classes/java/io/ByteArrayInputStream.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/ByteArrayInputStream.java	Mon Aug 10 14:05:37 2015 +0300
@@ -32,9 +32,9 @@
  * counter keeps track of the next byte to
  * be supplied by the <code>read</code> method.
  * <p>
- * Closing a <tt>ByteArrayInputStream</tt> has no effect. The methods in
+ * Closing a {@code ByteArrayInputStream} has no effect. The methods in
  * this class can be called after the stream has been closed without
- * generating an <tt>IOException</tt>.
+ * generating an {@code IOException}.
  *
  * @author  Arthur van Hoff
  * @see     java.io.StringBufferInputStream
@@ -272,9 +272,9 @@
     }
 
     /**
-     * Closing a <tt>ByteArrayInputStream</tt> has no effect. The methods in
+     * Closing a {@code ByteArrayInputStream} has no effect. The methods in
      * this class can be called after the stream has been closed without
-     * generating an <tt>IOException</tt>.
+     * generating an {@code IOException}.
      */
     public void close() throws IOException {
     }
--- a/jdk/src/java.base/share/classes/java/io/ByteArrayOutputStream.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/ByteArrayOutputStream.java	Mon Aug 10 14:05:37 2015 +0300
@@ -31,12 +31,12 @@
  * This class implements an output stream in which the data is
  * written into a byte array. The buffer automatically grows as data
  * is written to it.
- * The data can be retrieved using <code>toByteArray()</code> and
- * <code>toString()</code>.
+ * The data can be retrieved using {@code toByteArray()} and
+ * {@code toString()}.
  * <p>
- * Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in
+ * Closing a {@code ByteArrayOutputStream} has no effect. The methods in
  * this class can be called after the stream has been closed without
- * generating an <tt>IOException</tt>.
+ * generating an {@code IOException}.
  *
  * @author  Arthur van Hoff
  * @since   1.0
@@ -138,8 +138,8 @@
     }
 
     /**
-     * Writes <code>len</code> bytes from the specified byte array
-     * starting at offset <code>off</code> to this byte array output stream.
+     * Writes {@code len} bytes from the specified byte array
+     * starting at offset {@code off} to this byte array output stream.
      *
      * @param   b     the data.
      * @param   off   the start offset in the data.
@@ -158,7 +158,7 @@
     /**
      * Writes the complete contents of this byte array output stream to
      * the specified output stream argument, as if by calling the output
-     * stream's write method using <code>out.write(buf, 0, count)</code>.
+     * stream's write method using {@code out.write(buf, 0, count)}.
      *
      * @param      out   the output stream to which to write the data.
      * @exception  IOException  if an I/O error occurs.
@@ -168,7 +168,7 @@
     }
 
     /**
-     * Resets the <code>count</code> field of this byte array output
+     * Resets the {@code count} field of this byte array output
      * stream to zero, so that all currently accumulated output in the
      * output stream is discarded. The output stream can be used again,
      * reusing the already allocated buffer space.
@@ -194,7 +194,7 @@
     /**
      * Returns the current size of the buffer.
      *
-     * @return  the value of the <code>count</code> field, which is the number
+     * @return  the value of the {@code count} field, which is the number
      *          of valid bytes in this output stream.
      * @see     java.io.ByteArrayOutputStream#count
      */
@@ -204,7 +204,7 @@
 
     /**
      * Converts the buffer's contents into a string decoding bytes using the
-     * platform's default character set. The length of the new <tt>String</tt>
+     * platform's default character set. The length of the new {@code String}
      * is a function of the character set, and hence may not be equal to the
      * size of the buffer.
      *
@@ -224,7 +224,7 @@
     /**
      * Converts the buffer's contents into a string by decoding the bytes using
      * the named {@link java.nio.charset.Charset charset}. The length of the new
-     * <tt>String</tt> is a function of the charset, and hence may not be equal
+     * {@code String} is a function of the charset, and hence may not be equal
      * to the length of the byte array.
      *
      * <p> This method always replaces malformed-input and unmappable-character
@@ -251,14 +251,14 @@
      * copied into it. Each character <i>c</i> in the resulting string is
      * constructed from the corresponding element <i>b</i> in the byte
      * array such that:
-     * <blockquote><pre>
-     *     c == (char)(((hibyte &amp; 0xff) &lt;&lt; 8) | (b &amp; 0xff))
-     * </pre></blockquote>
+     * <blockquote><pre>{@code
+     *     c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))
+     * }</pre></blockquote>
      *
      * @deprecated This method does not properly convert bytes into characters.
      * As of JDK&nbsp;1.1, the preferred way to do this is via the
-     * <code>toString(String enc)</code> method, which takes an encoding-name
-     * argument, or the <code>toString()</code> method, which uses the
+     * {@code toString(String enc)} method, which takes an encoding-name
+     * argument, or the {@code toString()} method, which uses the
      * platform's default character encoding.
      *
      * @param      hibyte    the high byte of each resulting Unicode character.
@@ -273,9 +273,9 @@
     }
 
     /**
-     * Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in
+     * Closing a {@code ByteArrayOutputStream} has no effect. The methods in
      * this class can be called after the stream has been closed without
-     * generating an <tt>IOException</tt>.
+     * generating an {@code IOException}.
      */
     public void close() throws IOException {
     }
--- a/jdk/src/java.base/share/classes/java/io/CharArrayReader.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/CharArrayReader.java	Mon Aug 10 14:05:37 2015 +0300
@@ -62,13 +62,13 @@
      * Creates a CharArrayReader from the specified array of chars.
      *
      * <p> The resulting reader will start reading at the given
-     * <tt>offset</tt>.  The total number of <tt>char</tt> values that can be
-     * read from this reader will be either <tt>length</tt> or
-     * <tt>buf.length-offset</tt>, whichever is smaller.
+     * {@code offset}.  The total number of {@code char} values that can be
+     * read from this reader will be either {@code length} or
+     * {@code buf.length-offset}, whichever is smaller.
      *
      * @throws IllegalArgumentException
-     *         If <tt>offset</tt> is negative or greater than
-     *         <tt>buf.length</tt>, or if <tt>length</tt> is negative, or if
+     *         If {@code offset} is negative or greater than
+     *         {@code buf.length}, or if {@code length} is negative, or if
      *         the sum of these two values is negative.
      *
      * @param buf       Input buffer (not copied)
--- a/jdk/src/java.base/share/classes/java/io/CharArrayWriter.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/CharArrayWriter.java	Mon Aug 10 14:05:37 2015 +0300
@@ -141,21 +141,21 @@
     /**
      * Appends the specified character sequence to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq)</tt>
+     * <p> An invocation of this method of the form {@code out.append(csq)}
      * behaves in exactly the same way as the invocation
      *
      * <pre>
      *     out.write(csq.toString()) </pre>
      *
-     * <p> Depending on the specification of <tt>toString</tt> for the
-     * character sequence <tt>csq</tt>, the entire sequence may not be
-     * appended. For instance, invoking the <tt>toString</tt> method of a
+     * <p> Depending on the specification of {@code toString} for the
+     * character sequence {@code csq}, the entire sequence may not be
+     * appended. For instance, invoking the {@code toString} method of a
      * character buffer will return a subsequence whose content depends upon
      * the buffer's position and limit.
      *
      * @param  csq
-     *         The character sequence to append.  If <tt>csq</tt> is
-     *         <tt>null</tt>, then the four characters <tt>"null"</tt> are
+     *         The character sequence to append.  If {@code csq} is
+     *         {@code null}, then the four characters "{@code null}" are
      *         appended to this writer.
      *
      * @return  This writer
@@ -171,8 +171,9 @@
     /**
      * Appends a subsequence of the specified character sequence to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq, start,
-     * end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in
+     * <p> An invocation of this method of the form
+     * {@code out.append(csq, start, end)} when
+     * {@code csq} is not {@code null}, behaves in
      * exactly the same way as the invocation
      *
      * <pre>
@@ -180,9 +181,9 @@
      *
      * @param  csq
      *         The character sequence from which a subsequence will be
-     *         appended.  If <tt>csq</tt> is <tt>null</tt>, then characters
-     *         will be appended as if <tt>csq</tt> contained the four
-     *         characters <tt>"null"</tt>.
+     *         appended.  If {@code csq} is {@code null}, then characters
+     *         will be appended as if {@code csq} contained the four
+     *         characters "{@code null}".
      *
      * @param  start
      *         The index of the first character in the subsequence
@@ -194,9 +195,9 @@
      * @return  This writer
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt>
-     *          is greater than <tt>end</tt>, or <tt>end</tt> is greater than
-     *          <tt>csq.length()</tt>
+     *          If {@code start} or {@code end} are negative, {@code start}
+     *          is greater than {@code end}, or {@code end} is greater than
+     *          {@code csq.length()}
      *
      * @since  1.5
      */
@@ -209,7 +210,7 @@
     /**
      * Appends the specified character to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(c)</tt>
+     * <p> An invocation of this method of the form {@code out.append(c)}
      * behaves in exactly the same way as the invocation
      *
      * <pre>
--- a/jdk/src/java.base/share/classes/java/io/Console.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/Console.java	Mon Aug 10 14:05:37 2015 +0300
@@ -47,7 +47,7 @@
  * If this virtual machine has a console then it is represented by a
  * unique instance of this class which can be obtained by invoking the
  * {@link java.lang.System#console()} method.  If no console device is
- * available then an invocation of that method will return <tt>null</tt>.
+ * available then an invocation of that method will return {@code null}.
  * <p>
  * Read and write operations are synchronized to guarantee the atomic
  * completion of critical operations; therefore invoking methods
@@ -56,17 +56,17 @@
  * on the objects returned by {@link #reader()} and {@link #writer()} may
  * block in multithreaded scenarios.
  * <p>
- * Invoking <tt>close()</tt> on the objects returned by the {@link #reader()}
+ * Invoking {@code close()} on the objects returned by the {@link #reader()}
  * and the {@link #writer()} will not close the underlying stream of those
  * objects.
  * <p>
- * The console-read methods return <tt>null</tt> when the end of the
+ * The console-read methods return {@code null} when the end of the
  * console input stream is reached, for example by typing control-D on
  * Unix or control-Z on Windows.  Subsequent read operations will succeed
  * if additional characters are later entered on the console's input
  * device.
  * <p>
- * Unless otherwise specified, passing a <tt>null</tt> argument to any method
+ * Unless otherwise specified, passing a {@code null} argument to any method
  * in this class will cause a {@link NullPointerException} to be thrown.
  * <p>
  * <b>Security note:</b>
@@ -107,7 +107,7 @@
     * <p>
     * This method is intended to be used by sophisticated applications, for
     * example, a {@link java.util.Scanner} object which utilizes the rich
-    * parsing/scanning functionality provided by the <tt>Scanner</tt>:
+    * parsing/scanning functionality provided by the {@code Scanner}:
     * <blockquote><pre>
     * Console con = System.console();
     * if (con != null) {
@@ -117,7 +117,7 @@
     * </pre></blockquote>
     * <p>
     * For simple applications requiring only line-oriented reading, use
-    * <tt>{@link #readLine}</tt>.
+    * {@link #readLine}.
     * <p>
     * The bulk read operations {@link java.io.Reader#read(char[]) read(char[]) },
     * {@link java.io.Reader#read(char[], int, int) read(char[], int, int) } and
@@ -126,8 +126,8 @@
     * bound for each invocation, even if the destination buffer has space for
     * more characters. The {@code Reader}'s {@code read} methods may block if a
     * line bound has not been entered or reached on the console's input device.
-    * A line bound is considered to be any one of a line feed (<tt>'\n'</tt>),
-    * a carriage return (<tt>'\r'</tt>), a carriage return followed immediately
+    * A line bound is considered to be any one of a line feed ({@code '\n'}),
+    * a carriage return ({@code '\r'}), a carriage return followed immediately
     * by a linefeed, or an end of stream.
     *
     * @return  The reader associated with this console
@@ -152,7 +152,7 @@
     *         limited by the maximum dimension of a Java array as defined by
     *         <cite>The Java&trade; Virtual Machine Specification</cite>.
     *         The behaviour on a
-    *         <tt>null</tt> argument depends on the <a
+    *         {@code null} argument depends on the <a
     *         href="../util/Formatter.html#syntax">conversion</a>.
     *
     * @throws  IllegalFormatException
@@ -175,8 +175,9 @@
     * A convenience method to write a formatted string to this console's
     * output stream using the specified format string and arguments.
     *
-    * <p> An invocation of this method of the form <tt>con.printf(format,
-    * args)</tt> behaves in exactly the same way as the invocation of
+    * <p> An invocation of this method of the form
+    * {@code con.printf(format, args)} behaves in exactly the same way
+    * as the invocation of
     * <pre>con.format(format, args)</pre>.
     *
     * @param  format
@@ -191,7 +192,7 @@
     *         limited by the maximum dimension of a Java array as defined by
     *         <cite>The Java&trade; Virtual Machine Specification</cite>.
     *         The behaviour on a
-    *         <tt>null</tt> argument depends on the <a
+    *         {@code null} argument depends on the <a
     *         href="../util/Formatter.html#syntax">conversion</a>.
     *
     * @throws  IllegalFormatException
@@ -237,7 +238,7 @@
     *         If an I/O error occurs.
     *
     * @return  A string containing the line read from the console, not
-    *          including any line-termination characters, or <tt>null</tt>
+    *          including any line-termination characters, or {@code null}
     *          if an end of stream has been reached.
     */
     public String readLine(String fmt, Object ... args) {
@@ -265,7 +266,7 @@
     *         If an I/O error occurs.
     *
     * @return  A string containing the line read from the console, not
-    *          including any line-termination characters, or <tt>null</tt>
+    *          including any line-termination characters, or {@code null}
     *          if an end of stream has been reached.
     */
     public String readLine() {
@@ -302,7 +303,7 @@
     *
     * @return  A character array containing the password or passphrase read
     *          from the console, not including any line-termination characters,
-    *          or <tt>null</tt> if an end of stream has been reached.
+    *          or {@code null} if an end of stream has been reached.
     */
     public char[] readPassword(String fmt, Object ... args) {
         char[] passwd = null;
@@ -346,7 +347,7 @@
     *
     * @return  A character array containing the password or passphrase read
     *          from the console, not including any line-termination characters,
-    *          or <tt>null</tt> if an end of stream has been reached.
+    *          or {@code null} if an end of stream has been reached.
     */
     public char[] readPassword() {
         return readPassword("");
--- a/jdk/src/java.base/share/classes/java/io/File.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/File.java	Mon Aug 10 14:05:37 2015 +0300
@@ -63,8 +63,8 @@
  * pathname string, each name is separated from the next by a single copy of
  * the default <em>separator character</em>.  The default name-separator
  * character is defined by the system property <code>file.separator</code>, and
- * is made available in the public static fields <code>{@link
- * #separator}</code> and <code>{@link #separatorChar}</code> of this class.
+ * is made available in the public static fields {@link
+ * #separator} and {@link #separatorChar} of this class.
  * When a pathname string is converted into an abstract pathname, the names
  * within it may be separated by the default name-separator character or by any
  * other name-separator character that is supported by the underlying system.
@@ -82,11 +82,11 @@
  * <p> The <em>parent</em> of an abstract pathname may be obtained by invoking
  * the {@link #getParent} method of this class and consists of the pathname's
  * prefix and each name in the pathname's name sequence except for the last.
- * Each directory's absolute pathname is an ancestor of any <tt>File</tt>
+ * Each directory's absolute pathname is an ancestor of any {@code File}
  * object with an absolute abstract pathname which begins with the directory's
  * absolute pathname.  For example, the directory denoted by the abstract
- * pathname <tt>"/usr"</tt> is an ancestor of the directory denoted by the
- * pathname <tt>"/usr/local/bin"</tt>.
+ * pathname {@code "/usr"} is an ancestor of the directory denoted by the
+ * pathname {@code "/usr/local/bin"}.
  *
  * <p> The prefix concept is used to handle root directories on UNIX platforms,
  * and drive specifiers, root directories and UNC pathnames on Microsoft Windows platforms,
@@ -217,7 +217,7 @@
     /**
      * The system-dependent default name-separator character, represented as a
      * string for convenience.  This string contains a single character, namely
-     * <code>{@link #separatorChar}</code>.
+     * {@link #separatorChar}.
      */
     public static final String separator = "" + separatorChar;
 
@@ -236,7 +236,7 @@
     /**
      * The system-dependent path-separator character, represented as a string
      * for convenience.  This string contains a single character, namely
-     * <code>{@link #pathSeparatorChar}</code>.
+     * {@link #pathSeparatorChar}.
      */
     public static final String pathSeparator = "" + pathSeparatorChar;
 
@@ -374,33 +374,34 @@
     }
 
     /**
-     * Creates a new <tt>File</tt> instance by converting the given
-     * <tt>file:</tt> URI into an abstract pathname.
+     * Creates a new {@code File} instance by converting the given
+     * {@code file:} URI into an abstract pathname.
      *
-     * <p> The exact form of a <tt>file:</tt> URI is system-dependent, hence
+     * <p> The exact form of a {@code file:} URI is system-dependent, hence
      * the transformation performed by this constructor is also
      * system-dependent.
      *
      * <p> For a given abstract pathname <i>f</i> it is guaranteed that
      *
-     * <blockquote><tt>
-     * new File(</tt><i>&nbsp;f</i><tt>.{@link #toURI() toURI}()).equals(</tt><i>&nbsp;f</i><tt>.{@link #getAbsoluteFile() getAbsoluteFile}())
-     * </tt></blockquote>
+     * <blockquote><code>
+     * new File(</code><i>&nbsp;f</i><code>.{@link #toURI()
+     * toURI}()).equals(</code><i>&nbsp;f</i><code>.{@link #getAbsoluteFile() getAbsoluteFile}())
+     * </code></blockquote>
      *
      * so long as the original abstract pathname, the URI, and the new abstract
      * pathname are all created in (possibly different invocations of) the same
      * Java virtual machine.  This relationship typically does not hold,
-     * however, when a <tt>file:</tt> URI that is created in a virtual machine
+     * however, when a {@code file:} URI that is created in a virtual machine
      * on one operating system is converted into an abstract pathname in a
      * virtual machine on a different operating system.
      *
      * @param  uri
      *         An absolute, hierarchical URI with a scheme equal to
-     *         <tt>"file"</tt>, a non-empty path component, and undefined
+     *         {@code "file"}, a non-empty path component, and undefined
      *         authority, query, and fragment components
      *
      * @throws  NullPointerException
-     *          If <tt>uri</tt> is <tt>null</tt>
+     *          If {@code uri} is {@code null}
      *
      * @throws  IllegalArgumentException
      *          If the preconditions on the parameter do not hold
@@ -533,7 +534,7 @@
      * Returns the absolute pathname string of this abstract pathname.
      *
      * <p> If this abstract pathname is already absolute, then the pathname
-     * string is simply returned as if by the <code>{@link #getPath}</code>
+     * string is simply returned as if by the {@link #getPath}
      * method.  If this abstract pathname is the empty abstract pathname then
      * the pathname string of the current user directory, which is named by the
      * system property <code>user.dir</code>, is returned.  Otherwise this
@@ -581,7 +582,7 @@
      * converts this pathname to absolute form if necessary, as if by invoking the
      * {@link #getAbsolutePath} method, and then maps it to its unique form in a
      * system-dependent way.  This typically involves removing redundant names
-     * such as <tt>"."</tt> and <tt>".."</tt> from the pathname, resolving
+     * such as {@code "."} and {@code ".."} from the pathname, resolving
      * symbolic links (on UNIX platforms), and converting drive letters to a
      * standard case (on Microsoft Windows platforms).
      *
@@ -604,8 +605,8 @@
      *
      * @throws  SecurityException
      *          If a required system property value cannot be accessed, or
-     *          if a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead}</code> method denies
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead} method denies
      *          read access to the file
      *
      * @since   1.1
@@ -632,8 +633,8 @@
      *
      * @throws  SecurityException
      *          If a required system property value cannot be accessed, or
-     *          if a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead}</code> method denies
+     *          if a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead} method denies
      *          read access to the file
      *
      * @since 1.2
@@ -687,7 +688,7 @@
     }
 
     /**
-     * Constructs a <tt>file:</tt> URI that represents this abstract pathname.
+     * Constructs a {@code file:} URI that represents this abstract pathname.
      *
      * <p> The exact form of the URI is system-dependent.  If it can be
      * determined that the file denoted by this abstract pathname is a
@@ -695,15 +696,16 @@
      *
      * <p> For a given abstract pathname <i>f</i>, it is guaranteed that
      *
-     * <blockquote><tt>
-     * new {@link #File(java.net.URI) File}(</tt><i>&nbsp;f</i><tt>.toURI()).equals(</tt><i>&nbsp;f</i><tt>.{@link #getAbsoluteFile() getAbsoluteFile}())
-     * </tt></blockquote>
+     * <blockquote><code>
+     * new {@link #File(java.net.URI) File}(</code><i>&nbsp;f</i><code>.toURI()).equals(
+     * </code><i>&nbsp;f</i><code>.{@link #getAbsoluteFile() getAbsoluteFile}())
+     * </code></blockquote>
      *
      * so long as the original abstract pathname, the URI, and the new abstract
      * pathname are all created in (possibly different invocations of) the same
      * Java virtual machine.  Due to the system-dependent nature of abstract
      * pathnames, however, this relationship typically does not hold when a
-     * <tt>file:</tt> URI that is created in a virtual machine on one operating
+     * {@code file:} URI that is created in a virtual machine on one operating
      * system is converted into an abstract pathname in a virtual machine on a
      * different operating system.
      *
@@ -716,7 +718,7 @@
      * may be used to obtain a {@code Path} representing this abstract pathname.
      *
      * @return  An absolute, hierarchical URI with a scheme equal to
-     *          <tt>"file"</tt>, a path representing this abstract pathname,
+     *          {@code "file"}, a path representing this abstract pathname,
      *          and undefined authority, query, and fragment components
      * @throws SecurityException If a required system property value cannot
      * be accessed.
@@ -753,8 +755,8 @@
      *          application; <code>false</code> otherwise
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead(java.lang.String)}
      *          method denies read access to the file
      */
     public boolean canRead() {
@@ -781,8 +783,8 @@
      *          <code>false</code> otherwise.
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the file
      */
     public boolean canWrite() {
@@ -804,8 +806,8 @@
      *          by this abstract pathname exists; <code>false</code> otherwise
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead(java.lang.String)}
      *          method denies read access to the file or directory
      */
     public boolean exists() {
@@ -834,8 +836,8 @@
      *          <code>false</code> otherwise
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead(java.lang.String)}
      *          method denies read access to the file
      */
     public boolean isDirectory() {
@@ -867,8 +869,8 @@
      *          <code>false</code> otherwise
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead(java.lang.String)}
      *          method denies read access to the file
      */
     public boolean isFile() {
@@ -894,8 +896,8 @@
      *          underlying platform
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead(java.lang.String)}
      *          method denies read access to the file
      *
      * @since 1.2
@@ -928,8 +930,8 @@
      *          file does not exist or if an I/O error occurs
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead(java.lang.String)}
      *          method denies read access to the file
      */
     public long lastModified() {
@@ -959,8 +961,8 @@
      *          denoting system-dependent entities such as devices or pipes.
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead(java.lang.String)}
      *          method denies read access to the file
      */
     public long length() {
@@ -997,8 +999,8 @@
      *          If an I/O error occurred
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the file
      *
      * @since 1.2
@@ -1026,8 +1028,8 @@
      *          successfully deleted; <code>false</code> otherwise
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkDelete}</code> method denies
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkDelete} method denies
      *          delete access to the file
      */
     public boolean delete() {
@@ -1060,8 +1062,8 @@
      * facility should be used instead.
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkDelete}</code> method denies
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkDelete} method denies
      *          delete access to the file
      *
      * @see #delete
@@ -1301,8 +1303,8 @@
      *          created; <code>false</code> otherwise
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method does not permit the named directory to be created
      */
     public boolean mkdir() {
@@ -1327,12 +1329,12 @@
      *          otherwise
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkRead(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkRead(java.lang.String)}
      *          method does not permit verification of the existence of the
      *          named directory and all necessary parent directories; or if
-     *          the <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          the {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method does not permit the named directory and all necessary
      *          parent directories to be created
      */
@@ -1375,8 +1377,8 @@
      *          <code>false</code> otherwise
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to either the old or new pathnames
      *
      * @throws  NullPointerException
@@ -1405,7 +1407,7 @@
      * but some provide more precision.  The argument will be truncated to fit
      * the supported precision.  If the operation succeeds and no intervening
      * operations on the file take place, then the next invocation of the
-     * <code>{@link #lastModified}</code> method will return the (possibly
+     * {@link #lastModified} method will return the (possibly
      * truncated) <code>time</code> argument that was passed to this method.
      *
      * @param  time  The new last-modified time, measured in milliseconds since
@@ -1417,8 +1419,8 @@
      * @throws  IllegalArgumentException  If the argument is negative
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the named file
      *
      * @since 1.2
@@ -1448,8 +1450,8 @@
      *          <code>false</code> otherwise
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the named file
      *
      * @since 1.2
@@ -1491,8 +1493,8 @@
      *          the access permissions of this abstract pathname.
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the named file
      *
      * @since 1.6
@@ -1514,11 +1516,12 @@
      * machine with special privileges that allow it to modify files that
      * disallow write operations.
      *
-     * <p> An invocation of this method of the form <tt>file.setWritable(arg)</tt>
+     * <p> An invocation of this method of the form {@code file.setWritable(arg)}
      * behaves in exactly the same way as the invocation
      *
-     * <pre>
-     *     file.setWritable(arg, true) </pre>
+     * <pre>{@code
+     *     file.setWritable(arg, true)
+     * }</pre>
      *
      * @param   writable
      *          If <code>true</code>, sets the access permission to allow write
@@ -1529,8 +1532,8 @@
      *          change the access permissions of this abstract pathname.
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the file
      *
      * @since 1.6
@@ -1568,8 +1571,8 @@
      *          operation will fail.
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the file
      *
      * @since 1.6
@@ -1591,11 +1594,12 @@
      * machine with special privileges that allow it to read files that are
      * marked as unreadable.
      *
-     * <p>An invocation of this method of the form <tt>file.setReadable(arg)</tt>
+     * <p>An invocation of this method of the form {@code file.setReadable(arg)}
      * behaves in exactly the same way as the invocation
      *
-     * <pre>
-     *     file.setReadable(arg, true) </pre>
+     * <pre>{@code
+     *     file.setReadable(arg, true)
+     * }</pre>
      *
      * @param  readable
      *          If <code>true</code>, sets the access permission to allow read
@@ -1609,8 +1613,8 @@
      *          operation will fail.
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the file
      *
      * @since 1.6
@@ -1648,8 +1652,8 @@
      *          operation will fail.
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the file
      *
      * @since 1.6
@@ -1671,11 +1675,12 @@
      * virtual machine with special privileges that allow it to execute files
      * that are not marked executable.
      *
-     * <p>An invocation of this method of the form <tt>file.setExcutable(arg)</tt>
+     * <p>An invocation of this method of the form {@code file.setExcutable(arg)}
      * behaves in exactly the same way as the invocation
      *
-     * <pre>
-     *     file.setExecutable(arg, true) </pre>
+     * <pre>{@code
+     *     file.setExecutable(arg, true)
+     * }</pre>
      *
      * @param   executable
      *          If <code>true</code>, sets the access permission to allow execute
@@ -1689,8 +1694,8 @@
      *           operation will fail.
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method denies write access to the file
      *
      * @since 1.6
@@ -1710,8 +1715,8 @@
      *          <em>and</em> the application is allowed to execute the file
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkExec(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkExec(java.lang.String)}
      *          method denies execute access to the file
      *
      * @since 1.6
@@ -1783,12 +1788,12 @@
      * Returns the size of the partition <a href="#partName">named</a> by this
      * abstract pathname.
      *
-     * @return  The size, in bytes, of the partition or <tt>0L</tt> if this
+     * @return  The size, in bytes, of the partition or {@code 0L} if this
      *          abstract pathname does not name a partition
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     *          {@link RuntimePermission}<tt>("getFileSystemAttributes")</tt>
+     *          {@link RuntimePermission}{@code ("getFileSystemAttributes")}
      *          or its {@link SecurityManager#checkRead(String)} method denies
      *          read access to the file named by this abstract pathname
      *
@@ -1819,14 +1824,14 @@
      * makes no guarantee that write operations to this file system
      * will succeed.
      *
-     * @return  The number of unallocated bytes on the partition or <tt>0L</tt>
+     * @return  The number of unallocated bytes on the partition or {@code 0L}
      *          if the abstract pathname does not name a partition.  This
      *          value will be less than or equal to the total file system size
      *          returned by {@link #getTotalSpace}.
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     *          {@link RuntimePermission}<tt>("getFileSystemAttributes")</tt>
+     *          {@link RuntimePermission}{@code ("getFileSystemAttributes")}
      *          or its {@link SecurityManager#checkRead(String)} method denies
      *          read access to the file named by this abstract pathname
      *
@@ -1860,14 +1865,14 @@
      * virtual machine.  This method makes no guarantee that write operations
      * to this file system will succeed.
      *
-     * @return  The number of available bytes on the partition or <tt>0L</tt>
+     * @return  The number of available bytes on the partition or {@code 0L}
      *          if the abstract pathname does not name a partition.  On
      *          systems where this information is not available, this method
      *          will be equivalent to a call to {@link #getFreeSpace}.
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it denies
-     *          {@link RuntimePermission}<tt>("getFileSystemAttributes")</tt>
+     *          {@link RuntimePermission}{@code ("getFileSystemAttributes")}
      *          or its {@link SecurityManager#checkRead(String)} method denies
      *          read access to the file named by this abstract pathname
      *
@@ -1939,7 +1944,7 @@
      *
      * This method provides only part of a temporary-file facility.  To arrange
      * for a file created by this method to be deleted automatically, use the
-     * <code>{@link #deleteOnExit}</code> method.
+     * {@link #deleteOnExit} method.
      *
      * <p> The <code>prefix</code> argument must be at least three characters
      * long.  It is recommended that the prefix be a short, meaningful string
@@ -1987,8 +1992,8 @@
      * @throws  IOException  If a file could not be created
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method does not allow a file to be created
      *
      * @since 1.2
@@ -2032,9 +2037,9 @@
     /**
      * Creates an empty file in the default temporary-file directory, using
      * the given prefix and suffix to generate its name. Invoking this method
-     * is equivalent to invoking <code>{@link #createTempFile(java.lang.String,
+     * is equivalent to invoking {@link #createTempFile(java.lang.String,
      * java.lang.String, java.io.File)
-     * createTempFile(prefix,&nbsp;suffix,&nbsp;null)}</code>.
+     * createTempFile(prefix,&nbsp;suffix,&nbsp;null)}.
      *
      * <p> The {@link
      * java.nio.file.Files#createTempFile(String,String,java.nio.file.attribute.FileAttribute[])
@@ -2059,8 +2064,8 @@
      * @throws  IOException  If a file could not be created
      *
      * @throws  SecurityException
-     *          If a security manager exists and its <code>{@link
-     *          java.lang.SecurityManager#checkWrite(java.lang.String)}</code>
+     *          If a security manager exists and its {@link
+     *          java.lang.SecurityManager#checkWrite(java.lang.String)}
      *          method does not allow a file to be created
      *
      * @since 1.2
@@ -2136,7 +2141,7 @@
 
     /**
      * Returns the pathname string of this abstract pathname.  This is just the
-     * string returned by the <code>{@link #getPath}</code> method.
+     * string returned by the {@link #getPath} method.
      *
      * @return  The string form of this abstract pathname
      */
--- a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java	Mon Aug 10 14:05:37 2015 +0300
@@ -37,7 +37,7 @@
  * <code>File</code> or to a <code>FileDescriptor</code>. Whether or not
  * a file is available or may be created depends upon the underlying
  * platform.  Some platforms, in particular, allow a file to be opened
- * for writing by only one <tt>FileOutputStream</tt> (or other
+ * for writing by only one {@code FileOutputStream} (or other
  * file-writing object) at a time.  In such situations the constructors in
  * this class will fail if the file involved is already open.
  *
--- a/jdk/src/java.base/share/classes/java/io/FileReader.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/FileReader.java	Mon Aug 10 14:05:37 2015 +0300
@@ -32,9 +32,9 @@
  * size are appropriate.  To specify these values yourself, construct an
  * InputStreamReader on a FileInputStream.
  *
- * <p><code>FileReader</code> is meant for reading streams of characters.
+ * <p>{@code FileReader} is meant for reading streams of characters.
  * For reading streams of raw bytes, consider using a
- * <code>FileInputStream</code>.
+ * {@code FileInputStream}.
  *
  * @see InputStreamReader
  * @see FileInputStream
@@ -45,7 +45,7 @@
 public class FileReader extends InputStreamReader {
 
    /**
-    * Creates a new <tt>FileReader</tt>, given the name of the
+    * Creates a new {@code FileReader}, given the name of the
     * file to read from.
     *
     * @param fileName the name of the file to read from
@@ -59,10 +59,10 @@
     }
 
    /**
-    * Creates a new <tt>FileReader</tt>, given the <tt>File</tt>
+    * Creates a new {@code FileReader}, given the {@code File}
     * to read from.
     *
-    * @param file the <tt>File</tt> to read from
+    * @param file the {@code File} to read from
     * @exception  FileNotFoundException  if the file does not exist,
     *                   is a directory rather than a regular file,
     *                   or for some other reason cannot be opened for
@@ -73,8 +73,8 @@
     }
 
    /**
-    * Creates a new <tt>FileReader</tt>, given the
-    * <tt>FileDescriptor</tt> to read from.
+    * Creates a new {@code FileReader}, given the
+    * {@code FileDescriptor} to read from.
     *
     * @param fd the FileDescriptor to read from
     */
--- a/jdk/src/java.base/share/classes/java/io/FileWriter.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/FileWriter.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,13 +34,13 @@
  *
  * <p>Whether or not a file is available or may be created depends upon the
  * underlying platform.  Some platforms, in particular, allow a file to be
- * opened for writing by only one <tt>FileWriter</tt> (or other file-writing
+ * opened for writing by only one {@code FileWriter} (or other file-writing
  * object) at a time.  In such situations the constructors in this class
  * will fail if the file involved is already open.
  *
- * <p><code>FileWriter</code> is meant for writing streams of characters.
+ * <p>{@code FileWriter} is meant for writing streams of characters.
  * For writing streams of raw bytes, consider using a
- * <code>FileOutputStream</code>.
+ * {@code FileOutputStream}.
  *
  * @see OutputStreamWriter
  * @see FileOutputStream
@@ -68,7 +68,7 @@
      * indicating whether or not to append the data written.
      *
      * @param fileName  String The system-dependent filename.
-     * @param append    boolean if <code>true</code>, then data will be written
+     * @param append    boolean if {@code true}, then data will be written
      *                  to the end of the file rather than the beginning.
      * @throws IOException  if the named file exists but is a directory rather
      *                  than a regular file, does not exist but cannot be
@@ -92,11 +92,11 @@
 
     /**
      * Constructs a FileWriter object given a File object. If the second
-     * argument is <code>true</code>, then bytes will be written to the end
+     * argument is {@code true}, then bytes will be written to the end
      * of the file rather than the beginning.
      *
      * @param file  a File object to write to
-     * @param     append    if <code>true</code>, then bytes will be written
+     * @param     append    if {@code true}, then bytes will be written
      *                      to the end of the file rather than the beginning
      * @throws IOException  if the file exists but is a directory rather than
      *                  a regular file, does not exist but cannot be created,
--- a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java	Mon Aug 10 14:05:37 2015 +0300
@@ -57,7 +57,7 @@
      * underlying output stream.
      *
      * @param   out   the underlying output stream to be assigned to
-     *                the field <tt>this.out</tt> for later use, or
+     *                the field {@code this.out} for later use, or
      *                <code>null</code> if this instance is to be
      *                created without an underlying stream.
      */
@@ -70,9 +70,9 @@
      * <p>
      * The <code>write</code> method of <code>FilterOutputStream</code>
      * calls the <code>write</code> method of its underlying output stream,
-     * that is, it performs <tt>out.write(b)</tt>.
+     * that is, it performs {@code out.write(b)}.
      * <p>
-     * Implements the abstract <tt>write</tt> method of <tt>OutputStream</tt>.
+     * Implements the abstract {@code write} method of {@code OutputStream}.
      *
      * @param      b   the <code>byte</code>.
      * @exception  IOException  if an I/O error occurs.
--- a/jdk/src/java.base/share/classes/java/io/Flushable.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/Flushable.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,7 +28,7 @@
 import java.io.IOException;
 
 /**
- * A <tt>Flushable</tt> is a destination of data that can be flushed.  The
+ * A {@code Flushable} is a destination of data that can be flushed.  The
  * flush method is invoked to write any buffered output to the underlying
  * stream.
  *
--- a/jdk/src/java.base/share/classes/java/io/IOError.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/IOError.java	Mon Aug 10 14:05:37 2015 +0300
@@ -35,11 +35,11 @@
     /**
      * Constructs a new instance of IOError with the specified cause. The
      * IOError is created with the detail message of
-     * <tt>(cause==null ? null : cause.toString())</tt> (which typically
+     * {@code (cause==null ? null : cause.toString())} (which typically
      * contains the class and detail message of cause).
      *
      * @param  cause
-     *         The cause of this error, or <tt>null</tt> if the cause
+     *         The cause of this error, or {@code null} if the cause
      *         is not known
      */
     public IOError(Throwable cause) {
--- a/jdk/src/java.base/share/classes/java/io/LineNumberReader.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/LineNumberReader.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,10 +34,10 @@
  *
  * <p> By default, line numbering begins at 0. This number increments at every
  * <a href="#lt">line terminator</a> as the data is read, and can be changed
- * with a call to <tt>setLineNumber(int)</tt>.  Note however, that
- * <tt>setLineNumber(int)</tt> does not actually change the current position in
+ * with a call to {@code setLineNumber(int)}.  Note however, that
+ * {@code setLineNumber(int)} does not actually change the current position in
  * the stream; it only changes the value that will be returned by
- * <tt>getLineNumber()</tt>.
+ * {@code getLineNumber()}.
  *
  * <p> A line is considered to be <a name="lt">terminated</a> by any one of a
  * line feed ('\n'), a carriage return ('\r'), or a carriage return followed
@@ -193,7 +193,7 @@
      *
      * @return  A String containing the contents of the line, not including
      *          any <a href="#lt">line termination characters</a>, or
-     *          <tt>null</tt> if the end of the stream has been reached
+     *          {@code null} if the end of the stream has been reached
      *
      * @throws  IOException
      *          If an I/O error occurs
@@ -226,7 +226,7 @@
      *          If an I/O error occurs
      *
      * @throws  IllegalArgumentException
-     *          If <tt>n</tt> is negative
+     *          If {@code n} is negative
      */
     public long skip(long n) throws IOException {
         if (n < 0)
--- a/jdk/src/java.base/share/classes/java/io/OutputStream.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/OutputStream.java	Mon Aug 10 14:05:37 2015 +0300
@@ -94,7 +94,7 @@
      * <p>
      * If <code>off</code> is negative, or <code>len</code> is negative, or
      * <code>off+len</code> is greater than the length of the array
-     * <code>b</code>, then an <tt>IndexOutOfBoundsException</tt> is thrown.
+     * {@code b}, then an {@code IndexOutOfBoundsException} is thrown.
      *
      * @param      b     the data.
      * @param      off   the start offset in the data.
--- a/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java	Mon Aug 10 14:05:37 2015 +0300
@@ -53,7 +53,7 @@
  * </pre>
  *
  * <p> A <i>surrogate pair</i> is a character represented by a sequence of two
- * <tt>char</tt> values: A <i>high</i> surrogate in the range '&#92;uD800' to
+ * {@code char} values: A <i>high</i> surrogate in the range '&#92;uD800' to
  * '&#92;uDBFF' followed by a <i>low</i> surrogate in the range '&#92;uDC00' to
  * '&#92;uDFFF'.
  *
@@ -161,7 +161,7 @@
      * <p> If this instance was created with the {@link
      * #OutputStreamWriter(OutputStream, String)} constructor then the returned
      * name, being unique for the encoding, may differ from the name passed to
-     * the constructor.  This method may return <tt>null</tt> if the stream has
+     * the constructor.  This method may return {@code null} if the stream has
      * been closed. </p>
      *
      * @return The historical name of this encoding, or possibly
--- a/jdk/src/java.base/share/classes/java/io/PrintStream.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/PrintStream.java	Mon Aug 10 14:05:37 2015 +0300
@@ -32,22 +32,22 @@
 import java.nio.charset.UnsupportedCharsetException;
 
 /**
- * A <code>PrintStream</code> adds functionality to another output stream,
+ * A {@code PrintStream} adds functionality to another output stream,
  * namely the ability to print representations of various data values
  * conveniently.  Two other features are provided as well.  Unlike other output
- * streams, a <code>PrintStream</code> never throws an
- * <code>IOException</code>; instead, exceptional situations merely set an
- * internal flag that can be tested via the <code>checkError</code> method.
- * Optionally, a <code>PrintStream</code> can be created so as to flush
- * automatically; this means that the <code>flush</code> method is
+ * streams, a {@code PrintStream} never throws an
+ * {@code IOException}; instead, exceptional situations merely set an
+ * internal flag that can be tested via the {@code checkError} method.
+ * Optionally, a {@code PrintStream} can be created so as to flush
+ * automatically; this means that the {@code flush} method is
  * automatically invoked after a byte array is written, one of the
- * <code>println</code> methods is invoked, or a newline character or byte
- * (<code>'\n'</code>) is written.
+ * {@code println} methods is invoked, or a newline character or byte
+ * ({@code '\n'}) is written.
  *
- * <p> All characters printed by a <code>PrintStream</code> are converted into
- * bytes using the platform's default character encoding.  The <code>{@link
- * PrintWriter}</code> class should be used in situations that require writing
- * characters rather than bytes.
+ * <p> All characters printed by a {@code PrintStream} are converted into
+ * bytes using the platform's default character encoding.
+ * The {@link PrintWriter} class should be used in situations that require
+ *  writing characters rather than bytes.
  *
  * @author     Frank Yellin
  * @author     Mark Reinhold
@@ -142,8 +142,8 @@
      *                    printed
      * @param  autoFlush  A boolean; if true, the output buffer will be flushed
      *                    whenever a byte array is written, one of the
-     *                    <code>println</code> methods is invoked, or a newline
-     *                    character or byte (<code>'\n'</code>) is written
+     *                    {@code println} methods is invoked, or a newline
+     *                    character or byte ({@code '\n'}) is written
      *
      * @see java.io.PrintWriter#PrintWriter(java.io.OutputStream, boolean)
      */
@@ -158,8 +158,8 @@
      *                    printed
      * @param  autoFlush  A boolean; if true, the output buffer will be flushed
      *                    whenever a byte array is written, one of the
-     *                    <code>println</code> methods is invoked, or a newline
-     *                    character or byte (<code>'\n'</code>) is written
+     *                    {@code println} methods is invoked, or a newline
+     *                    character or byte ({@code '\n'}) is written
      * @param  encoding   The name of a supported
      *                    <a href="../lang/package-summary.html#charenc">
      *                    character encoding</a>
@@ -371,21 +371,21 @@
 
     /**
      * Flushes the stream and checks its error state. The internal error state
-     * is set to <code>true</code> when the underlying output stream throws an
-     * <code>IOException</code> other than <code>InterruptedIOException</code>,
-     * and when the <code>setError</code> method is invoked.  If an operation
+     * is set to {@code true} when the underlying output stream throws an
+     * {@code IOException} other than {@code InterruptedIOException},
+     * and when the {@code setError} method is invoked.  If an operation
      * on the underlying output stream throws an
-     * <code>InterruptedIOException</code>, then the <code>PrintStream</code>
+     * {@code InterruptedIOException}, then the {@code PrintStream}
      * converts the exception back into an interrupt by doing:
-     * <pre>
+     * <pre>{@code
      *     Thread.currentThread().interrupt();
-     * </pre>
+     * }</pre>
      * or the equivalent.
      *
-     * @return <code>true</code> if and only if this stream has encountered an
-     *         <code>IOException</code> other than
-     *         <code>InterruptedIOException</code>, or the
-     *         <code>setError</code> method has been invoked
+     * @return {@code true} if and only if this stream has encountered an
+     *         {@code IOException} other than
+     *         {@code InterruptedIOException}, or the
+     *         {@code setError} method has been invoked
      */
     public boolean checkError() {
         if (out != null)
@@ -398,11 +398,11 @@
     }
 
     /**
-     * Sets the error state of the stream to <code>true</code>.
+     * Sets the error state of the stream to {@code true}.
      *
      * <p> This method will cause subsequent invocations of {@link
-     * #checkError()} to return <tt>true</tt> until {@link
-     * #clearError()} is invoked.
+     * #checkError()} to return {@code true} until
+     * {@link #clearError()} is invoked.
      *
      * @since 1.1
      */
@@ -414,7 +414,7 @@
      * Clears the internal error state of this stream.
      *
      * <p> This method will cause subsequent invocations of {@link
-     * #checkError()} to return <tt>false</tt> until another write
+     * #checkError()} to return {@code false} until another write
      * operation fails and invokes {@link #setError()}.
      *
      * @since 1.6
@@ -430,12 +430,12 @@
 
     /**
      * Writes the specified byte to this stream.  If the byte is a newline and
-     * automatic flushing is enabled then the <code>flush</code> method will be
+     * automatic flushing is enabled then the {@code flush} method will be
      * invoked.
      *
      * <p> Note that the byte is written as given; to write a character that
      * will be translated according to the platform's default character
-     * encoding, use the <code>print(char)</code> or <code>println(char)</code>
+     * encoding, use the {@code print(char)} or {@code println(char)}
      * methods.
      *
      * @param  b  The byte to be written
@@ -460,13 +460,13 @@
     }
 
     /**
-     * Writes <code>len</code> bytes from the specified byte array starting at
-     * offset <code>off</code> to this stream.  If automatic flushing is
-     * enabled then the <code>flush</code> method will be invoked.
+     * Writes {@code len} bytes from the specified byte array starting at
+     * offset {@code off} to this stream.  If automatic flushing is
+     * enabled then the {@code flush} method will be invoked.
      *
      * <p> Note that the bytes will be written as given; to write characters
      * that will be translated according to the platform's default character
-     * encoding, use the <code>print(char)</code> or <code>println(char)</code>
+     * encoding, use the {@code print(char)} or {@code println(char)}
      * methods.
      *
      * @param  buf   A byte array
@@ -559,13 +559,13 @@
     /* Methods that do not terminate lines */
 
     /**
-     * Prints a boolean value.  The string produced by <code>{@link
-     * java.lang.String#valueOf(boolean)}</code> is translated into bytes
+     * Prints a boolean value.  The string produced by {@link
+     * java.lang.String#valueOf(boolean)} is translated into bytes
      * according to the platform's default character encoding, and these bytes
      * are written in exactly the manner of the
-     * <code>{@link #write(int)}</code> method.
+     * {@link #write(int)} method.
      *
-     * @param      b   The <code>boolean</code> to be printed
+     * @param      b   The {@code boolean} to be printed
      */
     public void print(boolean b) {
         write(b ? "true" : "false");
@@ -575,22 +575,22 @@
      * Prints a character.  The character is translated into one or more bytes
      * according to the platform's default character encoding, and these bytes
      * are written in exactly the manner of the
-     * <code>{@link #write(int)}</code> method.
+     * {@link #write(int)} method.
      *
-     * @param      c   The <code>char</code> to be printed
+     * @param      c   The {@code char} to be printed
      */
     public void print(char c) {
         write(String.valueOf(c));
     }
 
     /**
-     * Prints an integer.  The string produced by <code>{@link
-     * java.lang.String#valueOf(int)}</code> is translated into bytes
+     * Prints an integer.  The string produced by {@link
+     * java.lang.String#valueOf(int)} is translated into bytes
      * according to the platform's default character encoding, and these bytes
      * are written in exactly the manner of the
-     * <code>{@link #write(int)}</code> method.
+     * {@link #write(int)} method.
      *
-     * @param      i   The <code>int</code> to be printed
+     * @param      i   The {@code int} to be printed
      * @see        java.lang.Integer#toString(int)
      */
     public void print(int i) {
@@ -598,13 +598,13 @@
     }
 
     /**
-     * Prints a long integer.  The string produced by <code>{@link
-     * java.lang.String#valueOf(long)}</code> is translated into bytes
+     * Prints a long integer.  The string produced by {@link
+     * java.lang.String#valueOf(long)} is translated into bytes
      * according to the platform's default character encoding, and these bytes
      * are written in exactly the manner of the
-     * <code>{@link #write(int)}</code> method.
+     * {@link #write(int)} method.
      *
-     * @param      l   The <code>long</code> to be printed
+     * @param      l   The {@code long} to be printed
      * @see        java.lang.Long#toString(long)
      */
     public void print(long l) {
@@ -612,13 +612,13 @@
     }
 
     /**
-     * Prints a floating-point number.  The string produced by <code>{@link
-     * java.lang.String#valueOf(float)}</code> is translated into bytes
+     * Prints a floating-point number.  The string produced by {@link
+     * java.lang.String#valueOf(float)} is translated into bytes
      * according to the platform's default character encoding, and these bytes
      * are written in exactly the manner of the
-     * <code>{@link #write(int)}</code> method.
+     * {@link #write(int)} method.
      *
-     * @param      f   The <code>float</code> to be printed
+     * @param      f   The {@code float} to be printed
      * @see        java.lang.Float#toString(float)
      */
     public void print(float f) {
@@ -627,12 +627,12 @@
 
     /**
      * Prints a double-precision floating-point number.  The string produced by
-     * <code>{@link java.lang.String#valueOf(double)}</code> is translated into
+     * {@link java.lang.String#valueOf(double)} is translated into
      * bytes according to the platform's default character encoding, and these
-     * bytes are written in exactly the manner of the <code>{@link
-     * #write(int)}</code> method.
+     * bytes are written in exactly the manner of the {@link
+     * #write(int)} method.
      *
-     * @param      d   The <code>double</code> to be printed
+     * @param      d   The {@code double} to be printed
      * @see        java.lang.Double#toString(double)
      */
     public void print(double d) {
@@ -643,24 +643,24 @@
      * Prints an array of characters.  The characters are converted into bytes
      * according to the platform's default character encoding, and these bytes
      * are written in exactly the manner of the
-     * <code>{@link #write(int)}</code> method.
+     * {@link #write(int)} method.
      *
      * @param      s   The array of chars to be printed
      *
-     * @throws  NullPointerException  If <code>s</code> is <code>null</code>
+     * @throws  NullPointerException  If {@code s} is {@code null}
      */
     public void print(char s[]) {
         write(s);
     }
 
     /**
-     * Prints a string.  If the argument is <code>null</code> then the string
-     * <code>"null"</code> is printed.  Otherwise, the string's characters are
+     * Prints a string.  If the argument is {@code null} then the string
+     * {@code "null"} is printed.  Otherwise, the string's characters are
      * converted into bytes according to the platform's default character
      * encoding, and these bytes are written in exactly the manner of the
-     * <code>{@link #write(int)}</code> method.
+     * {@link #write(int)} method.
      *
-     * @param      s   The <code>String</code> to be printed
+     * @param      s   The {@code String} to be printed
      */
     public void print(String s) {
         if (s == null) {
@@ -670,13 +670,13 @@
     }
 
     /**
-     * Prints an object.  The string produced by the <code>{@link
-     * java.lang.String#valueOf(Object)}</code> method is translated into bytes
+     * Prints an object.  The string produced by the {@link
+     * java.lang.String#valueOf(Object)} method is translated into bytes
      * according to the platform's default character encoding, and these bytes
      * are written in exactly the manner of the
-     * <code>{@link #write(int)}</code> method.
+     * {@link #write(int)} method.
      *
-     * @param      obj   The <code>Object</code> to be printed
+     * @param      obj   The {@code Object} to be printed
      * @see        java.lang.Object#toString()
      */
     public void print(Object obj) {
@@ -689,8 +689,8 @@
     /**
      * Terminates the current line by writing the line separator string.  The
      * line separator string is defined by the system property
-     * <code>line.separator</code>, and is not necessarily a single newline
-     * character (<code>'\n'</code>).
+     * {@code line.separator}, and is not necessarily a single newline
+     * character ({@code '\n'}).
      */
     public void println() {
         newLine();
@@ -698,10 +698,10 @@
 
     /**
      * Prints a boolean and then terminate the line.  This method behaves as
-     * though it invokes <code>{@link #print(boolean)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(boolean)} and then
+     * {@link #println()}.
      *
-     * @param x  The <code>boolean</code> to be printed
+     * @param x  The {@code boolean} to be printed
      */
     public void println(boolean x) {
         synchronized (this) {
@@ -712,10 +712,10 @@
 
     /**
      * Prints a character and then terminate the line.  This method behaves as
-     * though it invokes <code>{@link #print(char)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(char)} and then
+     * {@link #println()}.
      *
-     * @param x  The <code>char</code> to be printed.
+     * @param x  The {@code char} to be printed.
      */
     public void println(char x) {
         synchronized (this) {
@@ -726,10 +726,10 @@
 
     /**
      * Prints an integer and then terminate the line.  This method behaves as
-     * though it invokes <code>{@link #print(int)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(int)} and then
+     * {@link #println()}.
      *
-     * @param x  The <code>int</code> to be printed.
+     * @param x  The {@code int} to be printed.
      */
     public void println(int x) {
         synchronized (this) {
@@ -740,10 +740,10 @@
 
     /**
      * Prints a long and then terminate the line.  This method behaves as
-     * though it invokes <code>{@link #print(long)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(long)} and then
+     * {@link #println()}.
      *
-     * @param x  a The <code>long</code> to be printed.
+     * @param x  a The {@code long} to be printed.
      */
     public void println(long x) {
         synchronized (this) {
@@ -754,10 +754,10 @@
 
     /**
      * Prints a float and then terminate the line.  This method behaves as
-     * though it invokes <code>{@link #print(float)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(float)} and then
+     * {@link #println()}.
      *
-     * @param x  The <code>float</code> to be printed.
+     * @param x  The {@code float} to be printed.
      */
     public void println(float x) {
         synchronized (this) {
@@ -768,10 +768,10 @@
 
     /**
      * Prints a double and then terminate the line.  This method behaves as
-     * though it invokes <code>{@link #print(double)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(double)} and then
+     * {@link #println()}.
      *
-     * @param x  The <code>double</code> to be printed.
+     * @param x  The {@code double} to be printed.
      */
     public void println(double x) {
         synchronized (this) {
@@ -782,8 +782,8 @@
 
     /**
      * Prints an array of characters and then terminate the line.  This method
-     * behaves as though it invokes <code>{@link #print(char[])}</code> and
-     * then <code>{@link #println()}</code>.
+     * behaves as though it invokes {@link #print(char[])} and
+     * then {@link #println()}.
      *
      * @param x  an array of chars to print.
      */
@@ -796,10 +796,10 @@
 
     /**
      * Prints a String and then terminate the line.  This method behaves as
-     * though it invokes <code>{@link #print(String)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(String)} and then
+     * {@link #println()}.
      *
-     * @param x  The <code>String</code> to be printed.
+     * @param x  The {@code String} to be printed.
      */
     public void println(String x) {
         synchronized (this) {
@@ -812,10 +812,10 @@
      * Prints an Object and then terminate the line.  This method calls
      * at first String.valueOf(x) to get the printed object's string value,
      * then behaves as
-     * though it invokes <code>{@link #print(String)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(String)} and then
+     * {@link #println()}.
      *
-     * @param x  The <code>Object</code> to be printed.
+     * @param x  The {@code Object} to be printed.
      */
     public void println(Object x) {
         String s = String.valueOf(x);
@@ -830,11 +830,13 @@
      * A convenience method to write a formatted string to this output stream
      * using the specified format string and arguments.
      *
-     * <p> An invocation of this method of the form <tt>out.printf(format,
-     * args)</tt> behaves in exactly the same way as the invocation
+     * <p> An invocation of this method of the form
+     * {@code out.printf(format, args)} behaves
+     * in exactly the same way as the invocation
      *
-     * <pre>
-     *     out.format(format, args) </pre>
+     * <pre>{@code
+     *     out.format(format, args)
+     * }</pre>
      *
      * @param  format
      *         A format string as described in <a
@@ -848,7 +850,7 @@
      *         limited by the maximum dimension of a Java array as defined by
      *         <cite>The Java&trade; Virtual Machine Specification</cite>.
      *         The behaviour on a
-     *         <tt>null</tt> argument depends on the <a
+     *         {@code null} argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
      * @throws  java.util.IllegalFormatException
@@ -861,7 +863,7 @@
      *          formatter class specification.
      *
      * @throws  NullPointerException
-     *          If the <tt>format</tt> is <tt>null</tt>
+     *          If the {@code format} is {@code null}
      *
      * @return  This output stream
      *
@@ -875,15 +877,17 @@
      * A convenience method to write a formatted string to this output stream
      * using the specified format string and arguments.
      *
-     * <p> An invocation of this method of the form <tt>out.printf(l, format,
-     * args)</tt> behaves in exactly the same way as the invocation
+     * <p> An invocation of this method of the form
+     * {@code out.printf(l, format, args)} behaves
+     * in exactly the same way as the invocation
      *
-     * <pre>
-     *     out.format(l, format, args) </pre>
+     * <pre>{@code
+     *     out.format(l, format, args)
+     * }</pre>
      *
      * @param  l
      *         The {@linkplain java.util.Locale locale} to apply during
-     *         formatting.  If <tt>l</tt> is <tt>null</tt> then no localization
+     *         formatting.  If {@code l} is {@code null} then no localization
      *         is applied.
      *
      * @param  format
@@ -898,7 +902,7 @@
      *         limited by the maximum dimension of a Java array as defined by
      *         <cite>The Java&trade; Virtual Machine Specification</cite>.
      *         The behaviour on a
-     *         <tt>null</tt> argument depends on the <a
+     *         {@code null} argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
      * @throws  java.util.IllegalFormatException
@@ -911,7 +915,7 @@
      *          formatter class specification.
      *
      * @throws  NullPointerException
-     *          If the <tt>format</tt> is <tt>null</tt>
+     *          If the {@code format} is {@code null}
      *
      * @return  This output stream
      *
@@ -941,7 +945,7 @@
      *         limited by the maximum dimension of a Java array as defined by
      *         <cite>The Java&trade; Virtual Machine Specification</cite>.
      *         The behaviour on a
-     *         <tt>null</tt> argument depends on the <a
+     *         {@code null} argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
      * @throws  java.util.IllegalFormatException
@@ -954,7 +958,7 @@
      *          formatter class specification.
      *
      * @throws  NullPointerException
-     *          If the <tt>format</tt> is <tt>null</tt>
+     *          If the {@code format} is {@code null}
      *
      * @return  This output stream
      *
@@ -983,7 +987,7 @@
      *
      * @param  l
      *         The {@linkplain java.util.Locale locale} to apply during
-     *         formatting.  If <tt>l</tt> is <tt>null</tt> then no localization
+     *         formatting.  If {@code l} is {@code null} then no localization
      *         is applied.
      *
      * @param  format
@@ -998,7 +1002,7 @@
      *         limited by the maximum dimension of a Java array as defined by
      *         <cite>The Java&trade; Virtual Machine Specification</cite>.
      *         The behaviour on a
-     *         <tt>null</tt> argument depends on the <a
+     *         {@code null} argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
      * @throws  java.util.IllegalFormatException
@@ -1011,7 +1015,7 @@
      *          formatter class specification.
      *
      * @throws  NullPointerException
-     *          If the <tt>format</tt> is <tt>null</tt>
+     *          If the {@code format} is {@code null}
      *
      * @return  This output stream
      *
@@ -1037,21 +1041,22 @@
     /**
      * Appends the specified character sequence to this output stream.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq)</tt>
+     * <p> An invocation of this method of the form {@code out.append(csq)}
      * behaves in exactly the same way as the invocation
      *
-     * <pre>
-     *     out.print(csq.toString()) </pre>
+     * <pre>{@code
+     *     out.print(csq.toString())
+     * }</pre>
      *
-     * <p> Depending on the specification of <tt>toString</tt> for the
-     * character sequence <tt>csq</tt>, the entire sequence may not be
-     * appended.  For instance, invoking then <tt>toString</tt> method of a
+     * <p> Depending on the specification of {@code toString} for the
+     * character sequence {@code csq}, the entire sequence may not be
+     * appended.  For instance, invoking then {@code toString} method of a
      * character buffer will return a subsequence whose content depends upon
      * the buffer's position and limit.
      *
      * @param  csq
-     *         The character sequence to append.  If <tt>csq</tt> is
-     *         <tt>null</tt>, then the four characters <tt>"null"</tt> are
+     *         The character sequence to append.  If {@code csq} is
+     *         {@code null}, then the four characters {@code "null"} are
      *         appended to this output stream.
      *
      * @return  This output stream
@@ -1070,18 +1075,20 @@
      * Appends a subsequence of the specified character sequence to this output
      * stream.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq, start,
-     * end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in
+     * <p> An invocation of this method of the form
+     * {@code out.append(csq, start, end)} when
+     * {@code csq} is not {@code null}, behaves in
      * exactly the same way as the invocation
      *
-     * <pre>
-     *     out.print(csq.subSequence(start, end).toString()) </pre>
+     * <pre>{@code
+     *     out.print(csq.subSequence(start, end).toString())
+     * }</pre>
      *
      * @param  csq
      *         The character sequence from which a subsequence will be
-     *         appended.  If <tt>csq</tt> is <tt>null</tt>, then characters
-     *         will be appended as if <tt>csq</tt> contained the four
-     *         characters <tt>"null"</tt>.
+     *         appended.  If {@code csq} is {@code null}, then characters
+     *         will be appended as if {@code csq} contained the four
+     *         characters {@code "null"}.
      *
      * @param  start
      *         The index of the first character in the subsequence
@@ -1093,9 +1100,9 @@
      * @return  This output stream
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt>
-     *          is greater than <tt>end</tt>, or <tt>end</tt> is greater than
-     *          <tt>csq.length()</tt>
+     *          If {@code start} or {@code end} are negative, {@code start}
+     *          is greater than {@code end}, or {@code end} is greater than
+     *          {@code csq.length()}
      *
      * @since  1.5
      */
@@ -1108,11 +1115,12 @@
     /**
      * Appends the specified character to this output stream.
      *
-     * <p> An invocation of this method of the form <tt>out.append(c)</tt>
+     * <p> An invocation of this method of the form {@code out.append(c)}
      * behaves in exactly the same way as the invocation
      *
-     * <pre>
-     *     out.print(c) </pre>
+     * <pre>{@code
+     *     out.print(c)
+     * }</pre>
      *
      * @param  c
      *         The 16-bit character to append
--- a/jdk/src/java.base/share/classes/java/io/PrintWriter.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/PrintWriter.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,13 +34,13 @@
 
 /**
  * Prints formatted representations of objects to a text-output stream.  This
- * class implements all of the <tt>print</tt> methods found in {@link
+ * class implements all of the {@code print} methods found in {@link
  * PrintStream}.  It does not contain methods for writing raw bytes, for which
  * a program should use unencoded byte streams.
  *
  * <p> Unlike the {@link PrintStream} class, if automatic flushing is enabled
- * it will be done only when one of the <tt>println</tt>, <tt>printf</tt>, or
- * <tt>format</tt> methods is invoked, rather than whenever a newline character
+ * it will be done only when one of the {@code println}, {@code printf}, or
+ * {@code format} methods is invoked, rather than whenever a newline character
  * happens to be output.  These methods use the platform's own notion of line
  * separator rather than the newline character.
  *
@@ -57,7 +57,7 @@
 
     /**
      * The underlying character-output stream of this
-     * <code>PrintWriter</code>.
+     * {@code PrintWriter}.
      *
      * @since 1.2
      */
@@ -98,8 +98,8 @@
      * Creates a new PrintWriter.
      *
      * @param  out        A character-output stream
-     * @param  autoFlush  A boolean; if true, the <tt>println</tt>,
-     *                    <tt>printf</tt>, or <tt>format</tt> methods will
+     * @param  autoFlush  A boolean; if true, the {@code println},
+     *                    {@code printf}, or {@code format} methods will
      *                    flush the output buffer
      */
     public PrintWriter(Writer out,
@@ -130,8 +130,8 @@
      * default character encoding.
      *
      * @param  out        An output stream
-     * @param  autoFlush  A boolean; if true, the <tt>println</tt>,
-     *                    <tt>printf</tt>, or <tt>format</tt> methods will
+     * @param  autoFlush  A boolean; if true, the {@code println},
+     *                    {@code printf}, or {@code format} methods will
      *                    flush the output buffer
      *
      * @see java.io.OutputStreamWriter#OutputStreamWriter(java.io.OutputStream)
@@ -340,7 +340,7 @@
     /**
      * Flushes the stream if it's not closed and checks its error state.
      *
-     * @return <code>true</code> if the print stream has encountered an error,
+     * @return {@code true} if the print stream has encountered an error,
      *          either on the underlying output stream or during a format
      *          conversion.
      */
@@ -361,7 +361,7 @@
      * Indicates that an error has occurred.
      *
      * <p> This method will cause subsequent invocations of {@link
-     * #checkError()} to return <tt>true</tt> until {@link
+     * #checkError()} to return {@code true} until {@link
      * #clearError()} is invoked.
      */
     protected void setError() {
@@ -372,7 +372,7 @@
      * Clears the error state of this stream.
      *
      * <p> This method will cause subsequent invocations of {@link
-     * #checkError()} to return <tt>false</tt> until another write
+     * #checkError()} to return {@code false} until another write
      * operation fails and invokes {@link #setError()}.
      *
      * @since 1.6
@@ -485,13 +485,13 @@
     /* Methods that do not terminate lines */
 
     /**
-     * Prints a boolean value.  The string produced by <code>{@link
-     * java.lang.String#valueOf(boolean)}</code> is translated into bytes
+     * Prints a boolean value.  The string produced by {@link
+     * java.lang.String#valueOf(boolean)} is translated into bytes
      * according to the platform's default character encoding, and these bytes
-     * are written in exactly the manner of the <code>{@link
-     * #write(int)}</code> method.
+     * are written in exactly the manner of the {@link
+     * #write(int)} method.
      *
-     * @param      b   The <code>boolean</code> to be printed
+     * @param      b   The {@code boolean} to be printed
      */
     public void print(boolean b) {
         write(b ? "true" : "false");
@@ -500,23 +500,23 @@
     /**
      * Prints a character.  The character is translated into one or more bytes
      * according to the platform's default character encoding, and these bytes
-     * are written in exactly the manner of the <code>{@link
-     * #write(int)}</code> method.
+     * are written in exactly the manner of the {@link
+     * #write(int)} method.
      *
-     * @param      c   The <code>char</code> to be printed
+     * @param      c   The {@code char} to be printed
      */
     public void print(char c) {
         write(c);
     }
 
     /**
-     * Prints an integer.  The string produced by <code>{@link
-     * java.lang.String#valueOf(int)}</code> is translated into bytes according
+     * Prints an integer.  The string produced by {@link
+     * java.lang.String#valueOf(int)} is translated into bytes according
      * to the platform's default character encoding, and these bytes are
-     * written in exactly the manner of the <code>{@link #write(int)}</code>
+     * written in exactly the manner of the {@link #write(int)}
      * method.
      *
-     * @param      i   The <code>int</code> to be printed
+     * @param      i   The {@code int} to be printed
      * @see        java.lang.Integer#toString(int)
      */
     public void print(int i) {
@@ -524,13 +524,13 @@
     }
 
     /**
-     * Prints a long integer.  The string produced by <code>{@link
-     * java.lang.String#valueOf(long)}</code> is translated into bytes
+     * Prints a long integer.  The string produced by {@link
+     * java.lang.String#valueOf(long)} is translated into bytes
      * according to the platform's default character encoding, and these bytes
-     * are written in exactly the manner of the <code>{@link #write(int)}</code>
+     * are written in exactly the manner of the {@link #write(int)}
      * method.
      *
-     * @param      l   The <code>long</code> to be printed
+     * @param      l   The {@code long} to be printed
      * @see        java.lang.Long#toString(long)
      */
     public void print(long l) {
@@ -538,13 +538,13 @@
     }
 
     /**
-     * Prints a floating-point number.  The string produced by <code>{@link
-     * java.lang.String#valueOf(float)}</code> is translated into bytes
+     * Prints a floating-point number.  The string produced by {@link
+     * java.lang.String#valueOf(float)} is translated into bytes
      * according to the platform's default character encoding, and these bytes
-     * are written in exactly the manner of the <code>{@link #write(int)}</code>
+     * are written in exactly the manner of the {@link #write(int)}
      * method.
      *
-     * @param      f   The <code>float</code> to be printed
+     * @param      f   The {@code float} to be printed
      * @see        java.lang.Float#toString(float)
      */
     public void print(float f) {
@@ -553,12 +553,12 @@
 
     /**
      * Prints a double-precision floating-point number.  The string produced by
-     * <code>{@link java.lang.String#valueOf(double)}</code> is translated into
+     * {@link java.lang.String#valueOf(double)} is translated into
      * bytes according to the platform's default character encoding, and these
-     * bytes are written in exactly the manner of the <code>{@link
-     * #write(int)}</code> method.
+     * bytes are written in exactly the manner of the {@link
+     * #write(int)} method.
      *
-     * @param      d   The <code>double</code> to be printed
+     * @param      d   The {@code double} to be printed
      * @see        java.lang.Double#toString(double)
      */
     public void print(double d) {
@@ -568,25 +568,25 @@
     /**
      * Prints an array of characters.  The characters are converted into bytes
      * according to the platform's default character encoding, and these bytes
-     * are written in exactly the manner of the <code>{@link #write(int)}</code>
+     * are written in exactly the manner of the {@link #write(int)}
      * method.
      *
      * @param      s   The array of chars to be printed
      *
-     * @throws  NullPointerException  If <code>s</code> is <code>null</code>
+     * @throws  NullPointerException  If {@code s} is {@code null}
      */
     public void print(char s[]) {
         write(s);
     }
 
     /**
-     * Prints a string.  If the argument is <code>null</code> then the string
-     * <code>"null"</code> is printed.  Otherwise, the string's characters are
+     * Prints a string.  If the argument is {@code null} then the string
+     * {@code "null"} is printed.  Otherwise, the string's characters are
      * converted into bytes according to the platform's default character
      * encoding, and these bytes are written in exactly the manner of the
-     * <code>{@link #write(int)}</code> method.
+     * {@link #write(int)} method.
      *
-     * @param      s   The <code>String</code> to be printed
+     * @param      s   The {@code String} to be printed
      */
     public void print(String s) {
         if (s == null) {
@@ -596,13 +596,13 @@
     }
 
     /**
-     * Prints an object.  The string produced by the <code>{@link
-     * java.lang.String#valueOf(Object)}</code> method is translated into bytes
+     * Prints an object.  The string produced by the {@link
+     * java.lang.String#valueOf(Object)} method is translated into bytes
      * according to the platform's default character encoding, and these bytes
-     * are written in exactly the manner of the <code>{@link #write(int)}</code>
+     * are written in exactly the manner of the {@link #write(int)}
      * method.
      *
-     * @param      obj   The <code>Object</code> to be printed
+     * @param      obj   The {@code Object} to be printed
      * @see        java.lang.Object#toString()
      */
     public void print(Object obj) {
@@ -614,8 +614,8 @@
     /**
      * Terminates the current line by writing the line separator string.  The
      * line separator string is defined by the system property
-     * <code>line.separator</code>, and is not necessarily a single newline
-     * character (<code>'\n'</code>).
+     * {@code line.separator}, and is not necessarily a single newline
+     * character ({@code '\n'}).
      */
     public void println() {
         newLine();
@@ -623,10 +623,10 @@
 
     /**
      * Prints a boolean value and then terminates the line.  This method behaves
-     * as though it invokes <code>{@link #print(boolean)}</code> and then
-     * <code>{@link #println()}</code>.
+     * as though it invokes {@link #print(boolean)} and then
+     * {@link #println()}.
      *
-     * @param x the <code>boolean</code> value to be printed
+     * @param x the {@code boolean} value to be printed
      */
     public void println(boolean x) {
         synchronized (lock) {
@@ -637,10 +637,10 @@
 
     /**
      * Prints a character and then terminates the line.  This method behaves as
-     * though it invokes <code>{@link #print(char)}</code> and then <code>{@link
-     * #println()}</code>.
+     * though it invokes {@link #print(char)} and then {@link
+     * #println()}.
      *
-     * @param x the <code>char</code> value to be printed
+     * @param x the {@code char} value to be printed
      */
     public void println(char x) {
         synchronized (lock) {
@@ -651,10 +651,10 @@
 
     /**
      * Prints an integer and then terminates the line.  This method behaves as
-     * though it invokes <code>{@link #print(int)}</code> and then <code>{@link
-     * #println()}</code>.
+     * though it invokes {@link #print(int)} and then {@link
+     * #println()}.
      *
-     * @param x the <code>int</code> value to be printed
+     * @param x the {@code int} value to be printed
      */
     public void println(int x) {
         synchronized (lock) {
@@ -665,10 +665,10 @@
 
     /**
      * Prints a long integer and then terminates the line.  This method behaves
-     * as though it invokes <code>{@link #print(long)}</code> and then
-     * <code>{@link #println()}</code>.
+     * as though it invokes {@link #print(long)} and then
+     * {@link #println()}.
      *
-     * @param x the <code>long</code> value to be printed
+     * @param x the {@code long} value to be printed
      */
     public void println(long x) {
         synchronized (lock) {
@@ -679,10 +679,10 @@
 
     /**
      * Prints a floating-point number and then terminates the line.  This method
-     * behaves as though it invokes <code>{@link #print(float)}</code> and then
-     * <code>{@link #println()}</code>.
+     * behaves as though it invokes {@link #print(float)} and then
+     * {@link #println()}.
      *
-     * @param x the <code>float</code> value to be printed
+     * @param x the {@code float} value to be printed
      */
     public void println(float x) {
         synchronized (lock) {
@@ -693,10 +693,10 @@
 
     /**
      * Prints a double-precision floating-point number and then terminates the
-     * line.  This method behaves as though it invokes <code>{@link
-     * #print(double)}</code> and then <code>{@link #println()}</code>.
+     * line.  This method behaves as though it invokes {@link
+     * #print(double)} and then {@link #println()}.
      *
-     * @param x the <code>double</code> value to be printed
+     * @param x the {@code double} value to be printed
      */
     public void println(double x) {
         synchronized (lock) {
@@ -707,10 +707,10 @@
 
     /**
      * Prints an array of characters and then terminates the line.  This method
-     * behaves as though it invokes <code>{@link #print(char[])}</code> and then
-     * <code>{@link #println()}</code>.
+     * behaves as though it invokes {@link #print(char[])} and then
+     * {@link #println()}.
      *
-     * @param x the array of <code>char</code> values to be printed
+     * @param x the array of {@code char} values to be printed
      */
     public void println(char x[]) {
         synchronized (lock) {
@@ -721,10 +721,10 @@
 
     /**
      * Prints a String and then terminates the line.  This method behaves as
-     * though it invokes <code>{@link #print(String)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(String)} and then
+     * {@link #println()}.
      *
-     * @param x the <code>String</code> value to be printed
+     * @param x the {@code String} value to be printed
      */
     public void println(String x) {
         synchronized (lock) {
@@ -737,10 +737,10 @@
      * Prints an Object and then terminates the line.  This method calls
      * at first String.valueOf(x) to get the printed object's string value,
      * then behaves as
-     * though it invokes <code>{@link #print(String)}</code> and then
-     * <code>{@link #println()}</code>.
+     * though it invokes {@link #print(String)} and then
+     * {@link #println()}.
      *
-     * @param x  The <code>Object</code> to be printed.
+     * @param x  The {@code Object} to be printed.
      */
     public void println(Object x) {
         String s = String.valueOf(x);
@@ -755,11 +755,13 @@
      * the specified format string and arguments.  If automatic flushing is
      * enabled, calls to this method will flush the output buffer.
      *
-     * <p> An invocation of this method of the form <tt>out.printf(format,
-     * args)</tt> behaves in exactly the same way as the invocation
+     * <p> An invocation of this method of the form
+     * {@code out.printf(format, args)}
+     * behaves in exactly the same way as the invocation
      *
-     * <pre>
-     *     out.format(format, args) </pre>
+     * <pre>{@code
+     *     out.format(format, args)
+     * }</pre>
      *
      * @param  format
      *         A format string as described in <a
@@ -773,7 +775,7 @@
      *         limited by the maximum dimension of a Java array as defined by
      *         <cite>The Java&trade; Virtual Machine Specification</cite>.
      *         The behaviour on a
-     *         <tt>null</tt> argument depends on the <a
+     *         {@code null} argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
      * @throws  java.util.IllegalFormatException
@@ -786,7 +788,7 @@
      *          formatter class specification.
      *
      * @throws  NullPointerException
-     *          If the <tt>format</tt> is <tt>null</tt>
+     *          If the {@code format} is {@code null}
      *
      * @return  This writer
      *
@@ -801,15 +803,17 @@
      * the specified format string and arguments.  If automatic flushing is
      * enabled, calls to this method will flush the output buffer.
      *
-     * <p> An invocation of this method of the form <tt>out.printf(l, format,
-     * args)</tt> behaves in exactly the same way as the invocation
+     * <p> An invocation of this method of the form
+     * {@code out.printf(l, format, args)}
+     * behaves in exactly the same way as the invocation
      *
-     * <pre>
-     *     out.format(l, format, args) </pre>
+     * <pre>{@code
+     *     out.format(l, format, args)
+     * }</pre>
      *
      * @param  l
      *         The {@linkplain java.util.Locale locale} to apply during
-     *         formatting.  If <tt>l</tt> is <tt>null</tt> then no localization
+     *         formatting.  If {@code l} is {@code null} then no localization
      *         is applied.
      *
      * @param  format
@@ -824,7 +828,7 @@
      *         limited by the maximum dimension of a Java array as defined by
      *         <cite>The Java&trade; Virtual Machine Specification</cite>.
      *         The behaviour on a
-     *         <tt>null</tt> argument depends on the <a
+     *         {@code null} argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
      * @throws  java.util.IllegalFormatException
@@ -837,7 +841,7 @@
      *          formatter class specification.
      *
      * @throws  NullPointerException
-     *          If the <tt>format</tt> is <tt>null</tt>
+     *          If the {@code format} is {@code null}
      *
      * @return  This writer
      *
@@ -868,7 +872,7 @@
      *         limited by the maximum dimension of a Java array as defined by
      *         <cite>The Java&trade; Virtual Machine Specification</cite>.
      *         The behaviour on a
-     *         <tt>null</tt> argument depends on the <a
+     *         {@code null} argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
      * @throws  java.util.IllegalFormatException
@@ -881,7 +885,7 @@
      *          Formatter class specification.
      *
      * @throws  NullPointerException
-     *          If the <tt>format</tt> is <tt>null</tt>
+     *          If the {@code format} is {@code null}
      *
      * @return  This writer
      *
@@ -913,7 +917,7 @@
      *
      * @param  l
      *         The {@linkplain java.util.Locale locale} to apply during
-     *         formatting.  If <tt>l</tt> is <tt>null</tt> then no localization
+     *         formatting.  If {@code l} is {@code null} then no localization
      *         is applied.
      *
      * @param  format
@@ -928,7 +932,7 @@
      *         limited by the maximum dimension of a Java array as defined by
      *         <cite>The Java&trade; Virtual Machine Specification</cite>.
      *         The behaviour on a
-     *         <tt>null</tt> argument depends on the <a
+     *         {@code null} argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
      * @throws  java.util.IllegalFormatException
@@ -941,7 +945,7 @@
      *          formatter class specification.
      *
      * @throws  NullPointerException
-     *          If the <tt>format</tt> is <tt>null</tt>
+     *          If the {@code format} is {@code null}
      *
      * @return  This writer
      *
@@ -968,21 +972,22 @@
     /**
      * Appends the specified character sequence to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq)</tt>
+     * <p> An invocation of this method of the form {@code out.append(csq)}
      * behaves in exactly the same way as the invocation
      *
-     * <pre>
-     *     out.write(csq.toString()) </pre>
+     * <pre>{@code
+     *     out.write(csq.toString())
+     * }</pre>
      *
-     * <p> Depending on the specification of <tt>toString</tt> for the
-     * character sequence <tt>csq</tt>, the entire sequence may not be
-     * appended. For instance, invoking the <tt>toString</tt> method of a
+     * <p> Depending on the specification of {@code toString} for the
+     * character sequence {@code csq}, the entire sequence may not be
+     * appended. For instance, invoking the {@code toString} method of a
      * character buffer will return a subsequence whose content depends upon
      * the buffer's position and limit.
      *
      * @param  csq
-     *         The character sequence to append.  If <tt>csq</tt> is
-     *         <tt>null</tt>, then the four characters <tt>"null"</tt> are
+     *         The character sequence to append.  If {@code csq} is
+     *         {@code null}, then the four characters {@code "null"} are
      *         appended to this writer.
      *
      * @return  This writer
@@ -1000,18 +1005,20 @@
     /**
      * Appends a subsequence of the specified character sequence to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq, start,
-     * end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in
+     * <p> An invocation of this method of the form
+     * {@code out.append(csq, start, end)}
+     * when {@code csq} is not {@code null}, behaves in
      * exactly the same way as the invocation
      *
-     * <pre>
-     *     out.write(csq.subSequence(start, end).toString()) </pre>
+     * <pre>{@code
+     *     out.write(csq.subSequence(start, end).toString())
+     * }</pre>
      *
      * @param  csq
      *         The character sequence from which a subsequence will be
-     *         appended.  If <tt>csq</tt> is <tt>null</tt>, then characters
-     *         will be appended as if <tt>csq</tt> contained the four
-     *         characters <tt>"null"</tt>.
+     *         appended.  If {@code csq} is {@code null}, then characters
+     *         will be appended as if {@code csq} contained the four
+     *         characters {@code "null"}.
      *
      * @param  start
      *         The index of the first character in the subsequence
@@ -1023,9 +1030,9 @@
      * @return  This writer
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt>
-     *          is greater than <tt>end</tt>, or <tt>end</tt> is greater than
-     *          <tt>csq.length()</tt>
+     *          If {@code start} or {@code end} are negative, {@code start}
+     *          is greater than {@code end}, or {@code end} is greater than
+     *          {@code csq.length()}
      *
      * @since  1.5
      */
@@ -1038,11 +1045,12 @@
     /**
      * Appends the specified character to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(c)</tt>
+     * <p> An invocation of this method of the form {@code out.append(c)}
      * behaves in exactly the same way as the invocation
      *
-     * <pre>
-     *     out.write(c) </pre>
+     * <pre>{@code
+     *     out.write(c)
+     * }</pre>
      *
      * @param  c
      *         The 16-bit character to append
--- a/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java	Mon Aug 10 14:05:37 2015 +0300
@@ -82,10 +82,10 @@
      * {@link FileDescriptor} object is created to represent the
      * connection to the file.
      *
-     * <p> The <tt>mode</tt> argument specifies the access mode with which the
+     * <p> The {@code mode} argument specifies the access mode with which the
      * file is to be opened.  The permitted values and their meanings are as
      * specified for the <a
-     * href="#mode"><tt>RandomAccessFile(File,String)</tt></a> constructor.
+     * href="#mode">{@code RandomAccessFile(File,String)}</a> constructor.
      *
      * <p>
      * If there is a security manager, its {@code checkRead} method
@@ -99,19 +99,19 @@
      * @param      name   the system-dependent filename
      * @param      mode   the access <a href="#mode">mode</a>
      * @exception  IllegalArgumentException  if the mode argument is not equal
-     *               to one of <tt>"r"</tt>, <tt>"rw"</tt>, <tt>"rws"</tt>, or
-     *               <tt>"rwd"</tt>
+     *             to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or
+     *             {@code "rwd"}
      * @exception FileNotFoundException
-     *            if the mode is <tt>"r"</tt> but the given string does not
+     *            if the mode is {@code "r"} but the given string does not
      *            denote an existing regular file, or if the mode begins with
-     *            <tt>"rw"</tt> but the given string does not denote an
+     *            {@code "rw"} but the given string does not denote an
      *            existing, writable regular file and a new regular file of
      *            that name cannot be created, or if some other error occurs
      *            while opening or creating the file
-     * @exception  SecurityException         if a security manager exists and its
-     *               {@code checkRead} method denies read access to the file
-     *               or the mode is "rw" and the security manager's
-     *               {@code checkWrite} method denies write access to the file
+     * @exception  SecurityException   if a security manager exists and its
+     *             {@code checkRead} method denies read access to the file
+     *             or the mode is {@code "rw"} and the security manager's
+     *             {@code checkWrite} method denies write access to the file
      * @see        java.lang.SecurityException
      * @see        java.lang.SecurityManager#checkRead(java.lang.String)
      * @see        java.lang.SecurityManager#checkWrite(java.lang.String)
@@ -129,33 +129,33 @@
      * write to, the file specified by the {@link File} argument.  A new {@link
      * FileDescriptor} object is created to represent this file connection.
      *
-     * <p>The <a name="mode"><tt>mode</tt></a> argument specifies the access mode
+     * <p>The <a name="mode">{@code mode}</a> argument specifies the access mode
      * in which the file is to be opened.  The permitted values and their
      * meanings are:
      *
      * <table summary="Access mode permitted values and meanings">
      * <tr><th align="left">Value</th><th align="left">Meaning</th></tr>
-     * <tr><td valign="top"><tt>"r"</tt></td>
-     *     <td> Open for reading only.  Invoking any of the <tt>write</tt>
-     *     methods of the resulting object will cause an {@link
-     *     java.io.IOException} to be thrown. </td></tr>
-     * <tr><td valign="top"><tt>"rw"</tt></td>
+     * <tr><td valign="top">{@code "r"}</td>
+     *     <td> Open for reading only. Invoking any of the {@code write}
+     *     methods of the resulting object will cause an
+     *     {@link java.io.IOException} to be thrown.</td></tr>
+     * <tr><td valign="top">{@code "rw"}</td>
      *     <td> Open for reading and writing.  If the file does not already
-     *     exist then an attempt will be made to create it. </td></tr>
-     * <tr><td valign="top"><tt>"rws"</tt></td>
-     *     <td> Open for reading and writing, as with <tt>"rw"</tt>, and also
+     *     exist then an attempt will be made to create it.</td></tr>
+     * <tr><td valign="top">{@code "rws"}</td>
+     *     <td> Open for reading and writing, as with {@code "rw"}, and also
      *     require that every update to the file's content or metadata be
-     *     written synchronously to the underlying storage device.  </td></tr>
-     * <tr><td valign="top"><tt>"rwd"&nbsp;&nbsp;</tt></td>
-     *     <td> Open for reading and writing, as with <tt>"rw"</tt>, and also
+     *     written synchronously to the underlying storage device.</td></tr>
+     * <tr><td valign="top">{@code "rwd"}</td>
+     *     <td> Open for reading and writing, as with {@code "rw"}, and also
      *     require that every update to the file's content be written
-     *     synchronously to the underlying storage device. </td></tr>
+     *     synchronously to the underlying storage device.</td></tr>
      * </table>
      *
-     * The <tt>"rws"</tt> and <tt>"rwd"</tt> modes work much like the {@link
+     * The {@code "rws"} and {@code "rwd"} modes work much like the {@link
      * java.nio.channels.FileChannel#force(boolean) force(boolean)} method of
      * the {@link java.nio.channels.FileChannel} class, passing arguments of
-     * <tt>true</tt> and <tt>false</tt>, respectively, except that they always
+     * {@code true} and {@code false}, respectively, except that they always
      * apply to every I/O operation and are therefore often more efficient.  If
      * the file resides on a local storage device then when an invocation of a
      * method of this class returns it is guaranteed that all changes made to
@@ -164,9 +164,9 @@
      * event of a system crash.  If the file does not reside on a local device
      * then no such guarantee is made.
      *
-     * <p>The <tt>"rwd"</tt> mode can be used to reduce the number of I/O
-     * operations performed.  Using <tt>"rwd"</tt> only requires updates to the
-     * file's content to be written to storage; using <tt>"rws"</tt> requires
+     * <p>The {@code "rwd"} mode can be used to reduce the number of I/O
+     * operations performed.  Using {@code "rwd"} only requires updates to the
+     * file's content to be written to storage; using {@code "rws"} requires
      * updates to both the file's content and its metadata to be written, which
      * generally requires at least one more low-level I/O operation.
      *
@@ -181,19 +181,19 @@
      * @param      mode   the access mode, as described
      *                    <a href="#mode">above</a>
      * @exception  IllegalArgumentException  if the mode argument is not equal
-     *               to one of <tt>"r"</tt>, <tt>"rw"</tt>, <tt>"rws"</tt>, or
-     *               <tt>"rwd"</tt>
+     *             to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or
+     *             {@code "rwd"}
      * @exception FileNotFoundException
-     *            if the mode is <tt>"r"</tt> but the given file object does
+     *            if the mode is {@code "r"} but the given file object does
      *            not denote an existing regular file, or if the mode begins
-     *            with <tt>"rw"</tt> but the given file object does not denote
+     *            with {@code "rw"} but the given file object does not denote
      *            an existing, writable regular file and a new regular file of
      *            that name cannot be created, or if some other error occurs
      *            while opening or creating the file
-     * @exception  SecurityException         if a security manager exists and its
-     *               {@code checkRead} method denies read access to the file
-     *               or the mode is "rw" and the security manager's
-     *               {@code checkWrite} method denies write access to the file
+     * @exception  SecurityException  if a security manager exists and its
+     *             {@code checkRead} method denies read access to the file
+     *             or the mode is {@code "rw"} and the security manager's
+     *             {@code checkWrite} method denies write access to the file
      * @see        java.lang.SecurityManager#checkRead(java.lang.String)
      * @see        java.lang.SecurityManager#checkWrite(java.lang.String)
      * @see        java.nio.channels.FileChannel#force(boolean)
--- a/jdk/src/java.base/share/classes/java/io/Reader.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/Reader.java	Mon Aug 10 14:05:37 2015 +0300
@@ -54,7 +54,7 @@
      * The object used to synchronize operations on this stream.  For
      * efficiency, a character-stream object may use an object other than
      * itself to protect critical sections.  A subclass should therefore use
-     * the object in this field rather than <tt>this</tt> or a synchronized
+     * the object in this field rather than {@code this} or a synchronized
      * method.
      */
     protected Object lock;
@@ -111,7 +111,7 @@
      * should override this method.
      *
      * @return     The character read, as an integer in the range 0 to 65535
-     *             (<tt>0x00-0xffff</tt>), or -1 if the end of the stream has
+     *             ({@code 0x00-0xffff}), or -1 if the end of the stream has
      *             been reached
      *
      * @exception  IOException  If an I/O error occurs
--- a/jdk/src/java.base/share/classes/java/io/StringWriter.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/StringWriter.java	Mon Aug 10 14:05:37 2015 +0300
@@ -30,9 +30,9 @@
  * A character stream that collects its output in a string buffer, which can
  * then be used to construct a string.
  * <p>
- * Closing a <tt>StringWriter</tt> has no effect. The methods in this class
+ * Closing a {@code StringWriter} has no effect. The methods in this class
  * can be called after the stream has been closed without generating an
- * <tt>IOException</tt>.
+ * {@code IOException}.
  *
  * @author      Mark Reinhold
  * @since       1.1
@@ -56,11 +56,11 @@
      * size.
      *
      * @param initialSize
-     *        The number of <tt>char</tt> values that will fit into this buffer
+     *        The number of {@code char} values that will fit into this buffer
      *        before it is automatically expanded
      *
      * @throws IllegalArgumentException
-     *         If <tt>initialSize</tt> is negative
+     *         If {@code initialSize} is negative
      */
     public StringWriter(int initialSize) {
         if (initialSize < 0) {
@@ -115,21 +115,21 @@
     /**
      * Appends the specified character sequence to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq)</tt>
+     * <p> An invocation of this method of the form {@code out.append(csq)}
      * behaves in exactly the same way as the invocation
      *
      * <pre>
      *     out.write(csq.toString()) </pre>
      *
-     * <p> Depending on the specification of <tt>toString</tt> for the
-     * character sequence <tt>csq</tt>, the entire sequence may not be
-     * appended. For instance, invoking the <tt>toString</tt> method of a
+     * <p> Depending on the specification of {@code toString} for the
+     * character sequence {@code csq}, the entire sequence may not be
+     * appended. For instance, invoking the {@code toString} method of a
      * character buffer will return a subsequence whose content depends upon
      * the buffer's position and limit.
      *
      * @param  csq
-     *         The character sequence to append.  If <tt>csq</tt> is
-     *         <tt>null</tt>, then the four characters <tt>"null"</tt> are
+     *         The character sequence to append.  If {@code csq} is
+     *         {@code null}, then the four characters "{@code null}" are
      *         appended to this writer.
      *
      * @return  This writer
@@ -147,18 +147,20 @@
     /**
      * Appends a subsequence of the specified character sequence to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq, start,
-     * end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in
+     * <p> An invocation of this method of the form
+     * {@code out.append(csq, start, end)} when {@code csq}
+     * is not {@code null}, behaves in
      * exactly the same way as the invocation
      *
-     * <pre>
-     *     out.write(csq.subSequence(start, end).toString()) </pre>
+     * <pre>{@code
+     *     out.write(csq.subSequence(start, end).toString())
+     * }</pre>
      *
      * @param  csq
      *         The character sequence from which a subsequence will be
-     *         appended.  If <tt>csq</tt> is <tt>null</tt>, then characters
-     *         will be appended as if <tt>csq</tt> contained the four
-     *         characters <tt>"null"</tt>.
+     *         appended.  If {@code csq} is {@code null}, then characters
+     *         will be appended as if {@code csq} contained the four
+     *         characters "{@code null}".
      *
      * @param  start
      *         The index of the first character in the subsequence
@@ -170,9 +172,9 @@
      * @return  This writer
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt>
-     *          is greater than <tt>end</tt>, or <tt>end</tt> is greater than
-     *          <tt>csq.length()</tt>
+     *          If {@code start} or {@code end} are negative, {@code start}
+     *          is greater than {@code end}, or {@code end} is greater than
+     *          {@code csq.length()}
      *
      * @since  1.5
      */
@@ -185,7 +187,7 @@
     /**
      * Appends the specified character to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(c)</tt>
+     * <p> An invocation of this method of the form {@code out.append(c)}
      * behaves in exactly the same way as the invocation
      *
      * <pre>
@@ -226,9 +228,9 @@
     }
 
     /**
-     * Closing a <tt>StringWriter</tt> has no effect. The methods in this
+     * Closing a {@code StringWriter} has no effect. The methods in this
      * class can be called after the stream has been closed without generating
-     * an <tt>IOException</tt>.
+     * an {@code IOException}.
      */
     public void close() throws IOException {
     }
--- a/jdk/src/java.base/share/classes/java/io/Writer.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/io/Writer.java	Mon Aug 10 14:05:37 2015 +0300
@@ -63,7 +63,7 @@
      * The object used to synchronize operations on this stream.  For
      * efficiency, a character-stream object may use an object other than
      * itself to protect critical sections.  A subclass should therefore use
-     * the object in this field rather than <tt>this</tt> or a synchronized
+     * the object in this field rather than {@code this} or a synchronized
      * method.
      */
     protected Object lock;
@@ -170,8 +170,8 @@
      *         Number of characters to write
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>off</tt> is negative, or <tt>len</tt> is negative,
-     *          or <tt>off+len</tt> is negative or greater than the length
+     *          If {@code off} is negative, or {@code len} is negative,
+     *          or {@code off+len} is negative or greater than the length
      *          of the given string
      *
      * @throws  IOException
@@ -196,21 +196,21 @@
     /**
      * Appends the specified character sequence to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq)</tt>
+     * <p> An invocation of this method of the form {@code out.append(csq)}
      * behaves in exactly the same way as the invocation
      *
      * <pre>
      *     out.write(csq.toString()) </pre>
      *
-     * <p> Depending on the specification of <tt>toString</tt> for the
-     * character sequence <tt>csq</tt>, the entire sequence may not be
-     * appended. For instance, invoking the <tt>toString</tt> method of a
+     * <p> Depending on the specification of {@code toString} for the
+     * character sequence {@code csq}, the entire sequence may not be
+     * appended. For instance, invoking the {@code toString} method of a
      * character buffer will return a subsequence whose content depends upon
      * the buffer's position and limit.
      *
      * @param  csq
-     *         The character sequence to append.  If <tt>csq</tt> is
-     *         <tt>null</tt>, then the four characters <tt>"null"</tt> are
+     *         The character sequence to append.  If {@code csq} is
+     *         {@code null}, then the four characters "{@code null}" are
      *         appended to this writer.
      *
      * @return  This writer
@@ -230,20 +230,22 @@
 
     /**
      * Appends a subsequence of the specified character sequence to this writer.
-     * <tt>Appendable</tt>.
+     * {@code Appendable}.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq, start,
-     * end)</tt> when <tt>csq</tt> is not <tt>null</tt> behaves in exactly the
+     * <p> An invocation of this method of the form
+     * {@code out.append(csq, start, end)} when {@code csq}
+     * is not {@code null} behaves in exactly the
      * same way as the invocation
      *
-     * <pre>
-     *     out.write(csq.subSequence(start, end).toString()) </pre>
+     * <pre>{@code
+     *     out.write(csq.subSequence(start, end).toString())
+     * }</pre>
      *
      * @param  csq
      *         The character sequence from which a subsequence will be
-     *         appended.  If <tt>csq</tt> is <tt>null</tt>, then characters
-     *         will be appended as if <tt>csq</tt> contained the four
-     *         characters <tt>"null"</tt>.
+     *         appended.  If {@code csq} is {@code null}, then characters
+     *         will be appended as if {@code csq} contained the four
+     *         characters "{@code null}".
      *
      * @param  start
      *         The index of the first character in the subsequence
@@ -255,9 +257,9 @@
      * @return  This writer
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt>
-     *          is greater than <tt>end</tt>, or <tt>end</tt> is greater than
-     *          <tt>csq.length()</tt>
+     *          If {@code start} or {@code end} are negative, {@code start}
+     *          is greater than {@code end}, or {@code end} is greater than
+     *          {@code csq.length()}
      *
      * @throws  IOException
      *          If an I/O error occurs
@@ -273,7 +275,7 @@
     /**
      * Appends the specified character to this writer.
      *
-     * <p> An invocation of this method of the form <tt>out.append(c)</tt>
+     * <p> An invocation of this method of the form {@code out.append(c)}
      * behaves in exactly the same way as the invocation
      *
      * <pre>
--- a/jdk/src/java.base/share/classes/java/lang/Appendable.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Appendable.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,15 +28,15 @@
 import java.io.IOException;
 
 /**
- * An object to which <tt>char</tt> sequences and values can be appended.  The
- * <tt>Appendable</tt> interface must be implemented by any class whose
+ * An object to which {@code char} sequences and values can be appended.  The
+ * {@code Appendable} interface must be implemented by any class whose
  * instances are intended to receive formatted output from a {@link
  * java.util.Formatter}.
  *
  * <p> The characters to be appended should be valid Unicode characters as
  * described in <a href="Character.html#unicode">Unicode Character
  * Representation</a>.  Note that supplementary characters may be composed of
- * multiple 16-bit <tt>char</tt> values.
+ * multiple 16-bit {@code char} values.
  *
  * <p> Appendables are not necessarily safe for multithreaded access.  Thread
  * safety is the responsibility of classes that extend and implement this
@@ -51,19 +51,19 @@
 public interface Appendable {
 
     /**
-     * Appends the specified character sequence to this <tt>Appendable</tt>.
+     * Appends the specified character sequence to this {@code Appendable}.
      *
      * <p> Depending on which class implements the character sequence
-     * <tt>csq</tt>, the entire sequence may not be appended.  For
-     * instance, if <tt>csq</tt> is a {@link java.nio.CharBuffer} then
+     * {@code csq}, the entire sequence may not be appended.  For
+     * instance, if {@code csq} is a {@link java.nio.CharBuffer} then
      * the subsequence to append is defined by the buffer's position and limit.
      *
      * @param  csq
-     *         The character sequence to append.  If <tt>csq</tt> is
-     *         <tt>null</tt>, then the four characters <tt>"null"</tt> are
+     *         The character sequence to append.  If {@code csq} is
+     *         {@code null}, then the four characters {@code "null"} are
      *         appended to this Appendable.
      *
-     * @return  A reference to this <tt>Appendable</tt>
+     * @return  A reference to this {@code Appendable}
      *
      * @throws  IOException
      *          If an I/O error occurs
@@ -72,10 +72,10 @@
 
     /**
      * Appends a subsequence of the specified character sequence to this
-     * <tt>Appendable</tt>.
+     * {@code Appendable}.
      *
-     * <p> An invocation of this method of the form <tt>out.append(csq, start,
-     * end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in
+     * <p> An invocation of this method of the form {@code out.append(csq, start, end)}
+     * when {@code csq} is not {@code null}, behaves in
      * exactly the same way as the invocation
      *
      * <pre>
@@ -83,9 +83,9 @@
      *
      * @param  csq
      *         The character sequence from which a subsequence will be
-     *         appended.  If <tt>csq</tt> is <tt>null</tt>, then characters
-     *         will be appended as if <tt>csq</tt> contained the four
-     *         characters <tt>"null"</tt>.
+     *         appended.  If {@code csq} is {@code null}, then characters
+     *         will be appended as if {@code csq} contained the four
+     *         characters {@code "null"}.
      *
      * @param  start
      *         The index of the first character in the subsequence
@@ -94,12 +94,12 @@
      *         The index of the character following the last character in the
      *         subsequence
      *
-     * @return  A reference to this <tt>Appendable</tt>
+     * @return  A reference to this {@code Appendable}
      *
      * @throws  IndexOutOfBoundsException
-     *          If <tt>start</tt> or <tt>end</tt> are negative, <tt>start</tt>
-     *          is greater than <tt>end</tt>, or <tt>end</tt> is greater than
-     *          <tt>csq.length()</tt>
+     *          If {@code start} or {@code end} are negative, {@code start}
+     *          is greater than {@code end}, or {@code end} is greater than
+     *          {@code csq.length()}
      *
      * @throws  IOException
      *          If an I/O error occurs
@@ -107,12 +107,12 @@
     Appendable append(CharSequence csq, int start, int end) throws IOException;
 
     /**
-     * Appends the specified character to this <tt>Appendable</tt>.
+     * Appends the specified character to this {@code Appendable}.
      *
      * @param  c
      *         The character to append
      *
-     * @return  A reference to this <tt>Appendable</tt>
+     * @return  A reference to this {@code Appendable}
      *
      * @throws  IOException
      *          If an I/O error occurs
--- a/jdk/src/java.base/share/classes/java/lang/ApplicationShutdownHooks.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/ApplicationShutdownHooks.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,7 +28,7 @@
 
 /*
  * Class to track and run user level shutdown hooks registered through
- * <tt>{@link Runtime#addShutdownHook Runtime.addShutdownHook}</tt>.
+ * {@link Runtime#addShutdownHook Runtime.addShutdownHook}.
  *
  * @see java.lang.Runtime#addShutdownHook
  * @see java.lang.Runtime#removeShutdownHook
--- a/jdk/src/java.base/share/classes/java/lang/AssertionStatusDirectives.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/AssertionStatusDirectives.java	Mon Aug 10 14:05:37 2015 +0300
@@ -29,8 +29,8 @@
  * A collection of assertion status directives (such as "enable assertions
  * in package p" or "disable assertions in class c").  This class is used by
  * the JVM to communicate the assertion status directives implied by
- * the <tt>java</tt> command line flags <tt>-enableassertions</tt>
- * (<tt>-ea</tt>) and <tt>-disableassertions</tt> (<tt>-da</tt>).
+ * the {@code java} command line flags {@code -enableassertions}
+ * ({@code -ea}) and {@code -disableassertions} ({@code -da}).
  *
  * @since  1.4
  * @author Josh Bloch
@@ -44,19 +44,19 @@
     String[] classes;
 
     /**
-     * A parallel array to <tt>classes</tt>, indicating whether each class
-     * is to have assertions enabled or disabled.  A value of <tt>true</tt>
-     * for <tt>classEnabled[i]</tt> indicates that the class named by
-     * <tt>classes[i]</tt> should have assertions enabled; a value of
-     * <tt>false</tt> indicates that it should have classes disabled.
-     * This array must have the same number of elements as <tt>classes</tt>.
+     * A parallel array to {@code classes}, indicating whether each class
+     * is to have assertions enabled or disabled.  A value of {@code true}
+     * for {@code classEnabled[i]} indicates that the class named by
+     * {@code classes[i]} should have assertions enabled; a value of
+     * {@code false} indicates that it should have classes disabled.
+     * This array must have the same number of elements as {@code classes}.
      *
      * <p>In the case of conflicting directives for the same class, the
      * last directive for a given class wins.  In other words, if a string
-     * <tt>s</tt> appears multiple times in the <tt>classes</tt> array
-     * and <tt>i</tt> is the highest integer for which
-     * <tt>classes[i].equals(s)</tt>, then <tt>classEnabled[i]</tt>
-     * indicates whether assertions are to be enabled in class <tt>s</tt>.
+     * {@code s} appears multiple times in the {@code classes} array
+     * and {@code i} is the highest integer for which
+     * {@code classes[i].equals(s)}, then {@code classEnabled[i]}
+     * indicates whether assertions are to be enabled in class {@code s}.
      */
     boolean[] classEnabled;
 
@@ -68,21 +68,21 @@
     String[] packages;
 
     /**
-     * A parallel array to <tt>packages</tt>, indicating whether each
+     * A parallel array to {@code packages}, indicating whether each
      * package-tree is to have assertions enabled or disabled.  A value of
-     * <tt>true</tt> for <tt>packageEnabled[i]</tt> indicates that the
-     * package-tree named by <tt>packages[i]</tt> should have assertions
-     * enabled; a value of <tt>false</tt> indicates that it should have
+     * {@code true} for {@code packageEnabled[i]} indicates that the
+     * package-tree named by {@code packages[i]} should have assertions
+     * enabled; a value of {@code false} indicates that it should have
      * assertions disabled.  This array must have the same number of
-     * elements as <tt>packages</tt>.
+     * elements as {@code packages}.
      *
      * In the case of conflicting directives for the same package-tree, the
      * last directive for a given package-tree wins.  In other words, if a
-     * string <tt>s</tt> appears multiple times in the <tt>packages</tt> array
-     * and <tt>i</tt> is the highest integer for which
-     * <tt>packages[i].equals(s)</tt>, then <tt>packageEnabled[i]</tt>
+     * string {@code s} appears multiple times in the {@code packages} array
+     * and {@code i} is the highest integer for which
+     * {@code packages[i].equals(s)}, then {@code packageEnabled[i]}
      * indicates whether assertions are to be enabled in package-tree
-     * <tt>s</tt>.
+     * {@code s}.
      */
     boolean[] packageEnabled;
 
--- a/jdk/src/java.base/share/classes/java/lang/CharSequence.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/CharSequence.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,21 +34,21 @@
 import java.util.stream.StreamSupport;
 
 /**
- * A <tt>CharSequence</tt> is a readable sequence of <code>char</code> values. This
+ * A {@code CharSequence} is a readable sequence of {@code char} values. This
  * interface provides uniform, read-only access to many different kinds of
- * <code>char</code> sequences.
- * A <code>char</code> value represents a character in the <i>Basic
+ * {@code char} sequences.
+ * A {@code char} value represents a character in the <i>Basic
  * Multilingual Plane (BMP)</i> or a surrogate. Refer to <a
  * href="Character.html#unicode">Unicode Character Representation</a> for details.
  *
  * <p> This interface does not refine the general contracts of the {@link
  * java.lang.Object#equals(java.lang.Object) equals} and {@link
  * java.lang.Object#hashCode() hashCode} methods.  The result of comparing two
- * objects that implement <tt>CharSequence</tt> is therefore, in general,
+ * objects that implement {@code CharSequence} is therefore, in general,
  * undefined.  Each object may be implemented by a different class, and there
  * is no guarantee that each class will be capable of testing its instances
  * for equality with those of the other.  It is therefore inappropriate to use
- * arbitrary <tt>CharSequence</tt> instances as elements in a set or as keys in
+ * arbitrary {@code CharSequence} instances as elements in a set or as keys in
  * a map. </p>
  *
  * @author Mike McCloskey
@@ -60,38 +60,38 @@
 
     /**
      * Returns the length of this character sequence.  The length is the number
-     * of 16-bit <code>char</code>s in the sequence.
+     * of 16-bit {@code char}s in the sequence.
      *
-     * @return  the number of <code>char</code>s in this sequence
+     * @return  the number of {@code char}s in this sequence
      */
     int length();
 
     /**
-     * Returns the <code>char</code> value at the specified index.  An index ranges from zero
-     * to <tt>length() - 1</tt>.  The first <code>char</code> value of the sequence is at
+     * Returns the {@code char} value at the specified index.  An index ranges from zero
+     * to {@code length() - 1}.  The first {@code char} value of the sequence is at
      * index zero, the next at index one, and so on, as for array
      * indexing.
      *
-     * <p>If the <code>char</code> value specified by the index is a
+     * <p>If the {@code char} value specified by the index is a
      * <a href="{@docRoot}/java/lang/Character.html#unicode">surrogate</a>, the surrogate
      * value is returned.
      *
-     * @param   index   the index of the <code>char</code> value to be returned
+     * @param   index   the index of the {@code char} value to be returned
      *
-     * @return  the specified <code>char</code> value
+     * @return  the specified {@code char} value
      *
      * @throws  IndexOutOfBoundsException
-     *          if the <tt>index</tt> argument is negative or not less than
-     *          <tt>length()</tt>
+     *          if the {@code index} argument is negative or not less than
+     *          {@code length()}
      */
     char charAt(int index);
 
     /**
-     * Returns a <code>CharSequence</code> that is a subsequence of this sequence.
-     * The subsequence starts with the <code>char</code> value at the specified index and
-     * ends with the <code>char</code> value at index <tt>end - 1</tt>.  The length
-     * (in <code>char</code>s) of the
-     * returned sequence is <tt>end - start</tt>, so if <tt>start == end</tt>
+     * Returns a {@code CharSequence} that is a subsequence of this sequence.
+     * The subsequence starts with the {@code char} value at the specified index and
+     * ends with the {@code char} value at index {@code end - 1}.  The length
+     * (in {@code char}s) of the
+     * returned sequence is {@code end - start}, so if {@code start == end}
      * then an empty sequence is returned.
      *
      * @param   start   the start index, inclusive
@@ -100,9 +100,9 @@
      * @return  the specified subsequence
      *
      * @throws  IndexOutOfBoundsException
-     *          if <tt>start</tt> or <tt>end</tt> are negative,
-     *          if <tt>end</tt> is greater than <tt>length()</tt>,
-     *          or if <tt>start</tt> is greater than <tt>end</tt>
+     *          if {@code start} or {@code end} are negative,
+     *          if {@code end} is greater than {@code length()},
+     *          or if {@code start} is greater than {@code end}
      */
     CharSequence subSequence(int start, int end);
 
--- a/jdk/src/java.base/share/classes/java/lang/Character.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Character.java	Mon Aug 10 14:05:37 2015 +0300
@@ -3502,7 +3502,7 @@
         /**
          * Returns the UnicodeBlock with the given name. Block
          * names are determined by The Unicode Standard. The file
-         * Blocks-&lt;version&gt;.txt defines blocks for a particular
+         * {@code Blocks-<version>.txt} defines blocks for a particular
          * version of the standard. The {@link Character} class specifies
          * the version of the standard that it supports.
          * <p>
@@ -7195,8 +7195,8 @@
         /**
          * Returns the UnicodeScript constant with the given Unicode script
          * name or the script name alias. Script names and their aliases are
-         * determined by The Unicode Standard. The files Scripts&lt;version&gt;.txt
-         * and PropertyValueAliases&lt;version&gt;.txt define script names
+         * determined by The Unicode Standard. The files {@code Scripts<version>.txt}
+         * and {@code PropertyValueAliases<version>.txt} define script names
          * and the script name aliases for a particular version of the
          * standard. The {@link Character} class specifies the version of
          * the standard that it supports.
@@ -7255,9 +7255,9 @@
     }
 
     /**
-     * Returns a <tt>Character</tt> instance representing the specified
-     * <tt>char</tt> value.
-     * If a new <tt>Character</tt> instance is not required, this method
+     * Returns a {@code Character} instance representing the specified
+     * {@code char} value.
+     * If a new {@code Character} instance is not required, this method
      * should generally be used in preference to the constructor
      * {@link #Character(char)}, as this method is likely to yield
      * significantly better space and time performance by caching
@@ -7268,7 +7268,7 @@
      * cache other values outside of this range.
      *
      * @param  c a char value.
-     * @return a <tt>Character</tt> instance representing <tt>c</tt>.
+     * @return a {@code Character} instance representing {@code c}.
      * @since  1.5
      */
     @HotSpotIntrinsicCandidate
@@ -9871,7 +9871,7 @@
     }
 
     /**
-     * The number of bits used to represent a <tt>char</tt> value in unsigned
+     * The number of bits used to represent a {@code char} value in unsigned
      * binary form, constant {@code 16}.
      *
      * @since 1.5
@@ -9888,11 +9888,11 @@
 
     /**
      * Returns the value obtained by reversing the order of the bytes in the
-     * specified <tt>char</tt> value.
+     * specified {@code char} value.
      *
      * @param ch The {@code char} of which to reverse the byte order.
      * @return the value obtained by reversing (or, equivalently, swapping)
-     *     the bytes in the specified <tt>char</tt> value.
+     *     the bytes in the specified {@code char} value.
      * @since 1.5
      */
     @HotSpotIntrinsicCandidate
--- a/jdk/src/java.base/share/classes/java/lang/ClassNotFoundException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/ClassNotFoundException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -98,7 +98,7 @@
 
     /**
      * Returns the exception that was raised if an error occurred while
-     * attempting to load the class. Otherwise, returns <tt>null</tt>.
+     * attempting to load the class. Otherwise, returns {@code null}.
      *
      * <p>This method predates the general-purpose exception chaining facility.
      * The {@link Throwable#getCause()} method is now the preferred means of
@@ -114,7 +114,7 @@
     /**
      * Returns the cause of this exception (the exception that was raised
      * if an error occurred while attempting to load the class; otherwise
-     * <tt>null</tt>).
+     * {@code null}).
      *
      * @return  the cause of this exception.
      * @since   1.4
--- a/jdk/src/java.base/share/classes/java/lang/Cloneable.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Cloneable.java	Mon Aug 10 14:05:37 2015 +0300
@@ -36,11 +36,11 @@
  * <code>CloneNotSupportedException</code> being thrown.
  * <p>
  * By convention, classes that implement this interface should override
- * <tt>Object.clone</tt> (which is protected) with a public method.
+ * {@code Object.clone} (which is protected) with a public method.
  * See {@link java.lang.Object#clone()} for details on overriding this
  * method.
  * <p>
- * Note that this interface does <i>not</i> contain the <tt>clone</tt> method.
+ * Note that this interface does <i>not</i> contain the {@code clone} method.
  * Therefore, it is not possible to clone an object merely by virtue of the
  * fact that it implements this interface.  Even if the clone method is invoked
  * reflectively, there is no guarantee that it will succeed.
--- a/jdk/src/java.base/share/classes/java/lang/Comparable.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Comparable.java	Mon Aug 10 14:05:37 2015 +0300
@@ -29,7 +29,7 @@
 /**
  * This interface imposes a total ordering on the objects of each class that
  * implements it.  This ordering is referred to as the class's <i>natural
- * ordering</i>, and the class's <tt>compareTo</tt> method is referred to as
+ * ordering</i>, and the class's {@code compareTo} method is referred to as
  * its <i>natural comparison method</i>.<p>
  *
  * Lists (and arrays) of objects that implement this interface can be sorted
@@ -39,45 +39,45 @@
  * elements in a {@linkplain SortedSet sorted set}, without the need to
  * specify a {@linkplain Comparator comparator}.<p>
  *
- * The natural ordering for a class <tt>C</tt> is said to be <i>consistent
- * with equals</i> if and only if <tt>e1.compareTo(e2) == 0</tt> has
- * the same boolean value as <tt>e1.equals(e2)</tt> for every
- * <tt>e1</tt> and <tt>e2</tt> of class <tt>C</tt>.  Note that <tt>null</tt>
- * is not an instance of any class, and <tt>e.compareTo(null)</tt> should
- * throw a <tt>NullPointerException</tt> even though <tt>e.equals(null)</tt>
- * returns <tt>false</tt>.<p>
+ * The natural ordering for a class {@code C} is said to be <i>consistent
+ * with equals</i> if and only if {@code e1.compareTo(e2) == 0} has
+ * the same boolean value as {@code e1.equals(e2)} for every
+ * {@code e1} and {@code e2} of class {@code C}.  Note that {@code null}
+ * is not an instance of any class, and {@code e.compareTo(null)} should
+ * throw a {@code NullPointerException} even though {@code e.equals(null)}
+ * returns {@code false}.<p>
  *
  * It is strongly recommended (though not required) that natural orderings be
  * consistent with equals.  This is so because sorted sets (and sorted maps)
  * without explicit comparators behave "strangely" when they are used with
  * elements (or keys) whose natural ordering is inconsistent with equals.  In
  * particular, such a sorted set (or sorted map) violates the general contract
- * for set (or map), which is defined in terms of the <tt>equals</tt>
+ * for set (or map), which is defined in terms of the {@code equals}
  * method.<p>
  *
- * For example, if one adds two keys <tt>a</tt> and <tt>b</tt> such that
+ * For example, if one adds two keys {@code a} and {@code b} such that
  * {@code (!a.equals(b) && a.compareTo(b) == 0)} to a sorted
- * set that does not use an explicit comparator, the second <tt>add</tt>
+ * set that does not use an explicit comparator, the second {@code add}
  * operation returns false (and the size of the sorted set does not increase)
- * because <tt>a</tt> and <tt>b</tt> are equivalent from the sorted set's
+ * because {@code a} and {@code b} are equivalent from the sorted set's
  * perspective.<p>
  *
- * Virtually all Java core classes that implement <tt>Comparable</tt> have natural
+ * Virtually all Java core classes that implement {@code Comparable} have natural
  * orderings that are consistent with equals.  One exception is
- * <tt>java.math.BigDecimal</tt>, whose natural ordering equates
- * <tt>BigDecimal</tt> objects with equal values and different precisions
+ * {@code java.math.BigDecimal}, whose natural ordering equates
+ * {@code BigDecimal} objects with equal values and different precisions
  * (such as 4.0 and 4.00).<p>
  *
  * For the mathematically inclined, the <i>relation</i> that defines
- * the natural ordering on a given class C is:<pre>
- *       {(x, y) such that x.compareTo(y) &lt;= 0}.
- * </pre> The <i>quotient</i> for this total order is: <pre>
+ * the natural ordering on a given class C is:<pre>{@code
+ *       {(x, y) such that x.compareTo(y) <= 0}.
+ * }</pre> The <i>quotient</i> for this total order is: <pre>{@code
  *       {(x, y) such that x.compareTo(y) == 0}.
- * </pre>
+ * }</pre>
  *
- * It follows immediately from the contract for <tt>compareTo</tt> that the
- * quotient is an <i>equivalence relation</i> on <tt>C</tt>, and that the
- * natural ordering is a <i>total order</i> on <tt>C</tt>.  When we say that a
+ * It follows immediately from the contract for {@code compareTo} that the
+ * quotient is an <i>equivalence relation</i> on {@code C}, and that the
+ * natural ordering is a <i>total order</i> on {@code C}.  When we say that a
  * class's natural ordering is <i>consistent with equals</i>, we mean that the
  * quotient for the natural ordering is the equivalence relation defined by
  * the class's {@link Object#equals(Object) equals(Object)} method:<pre>
@@ -99,30 +99,31 @@
      * negative integer, zero, or a positive integer as this object is less
      * than, equal to, or greater than the specified object.
      *
-     * <p>The implementor must ensure <tt>sgn(x.compareTo(y)) ==
-     * -sgn(y.compareTo(x))</tt> for all <tt>x</tt> and <tt>y</tt>.  (This
-     * implies that <tt>x.compareTo(y)</tt> must throw an exception iff
-     * <tt>y.compareTo(x)</tt> throws an exception.)
+     * <p>The implementor must ensure
+     * {@code sgn(x.compareTo(y)) == -sgn(y.compareTo(x))}
+     * for all {@code x} and {@code y}.  (This
+     * implies that {@code x.compareTo(y)} must throw an exception iff
+     * {@code y.compareTo(x)} throws an exception.)
      *
      * <p>The implementor must also ensure that the relation is transitive:
-     * <tt>(x.compareTo(y)&gt;0 &amp;&amp; y.compareTo(z)&gt;0)</tt> implies
-     * <tt>x.compareTo(z)&gt;0</tt>.
+     * {@code (x.compareTo(y) > 0 && y.compareTo(z) > 0)} implies
+     * {@code x.compareTo(z) > 0}.
      *
-     * <p>Finally, the implementor must ensure that <tt>x.compareTo(y)==0</tt>
-     * implies that <tt>sgn(x.compareTo(z)) == sgn(y.compareTo(z))</tt>, for
-     * all <tt>z</tt>.
+     * <p>Finally, the implementor must ensure that {@code x.compareTo(y)==0}
+     * implies that {@code sgn(x.compareTo(z)) == sgn(y.compareTo(z))}, for
+     * all {@code z}.
      *
      * <p>It is strongly recommended, but <i>not</i> strictly required that
-     * <tt>(x.compareTo(y)==0) == (x.equals(y))</tt>.  Generally speaking, any
-     * class that implements the <tt>Comparable</tt> interface and violates
+     * {@code (x.compareTo(y)==0) == (x.equals(y))}.  Generally speaking, any
+     * class that implements the {@code Comparable} interface and violates
      * this condition should clearly indicate this fact.  The recommended
      * language is "Note: this class has a natural ordering that is
      * inconsistent with equals."
      *
      * <p>In the foregoing description, the notation
-     * <tt>sgn(</tt><i>expression</i><tt>)</tt> designates the mathematical
-     * <i>signum</i> function, which is defined to return one of <tt>-1</tt>,
-     * <tt>0</tt>, or <tt>1</tt> according to whether the value of
+     * {@code sgn(}<i>expression</i>{@code )} designates the mathematical
+     * <i>signum</i> function, which is defined to return one of {@code -1},
+     * {@code 0}, or {@code 1} according to whether the value of
      * <i>expression</i> is negative, zero or positive.
      *
      * @param   o the object to be compared.
--- a/jdk/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -51,7 +51,7 @@
     private String constantName;
 
     /**
-     * Constructs an <tt>EnumConstantNotPresentException</tt> for the
+     * Constructs an {@code EnumConstantNotPresentException} for the
      * specified constant.
      *
      * @param enumType the type of the missing enum constant
--- a/jdk/src/java.base/share/classes/java/lang/Exception.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Exception.java	Mon Aug 10 14:05:37 2015 +0300
@@ -75,7 +75,7 @@
      * @param  message the detail message (which is saved for later retrieval
      *         by the {@link #getMessage()} method).
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link #getCause()} method).  (A <tt>null</tt> value is
+     *         {@link #getCause()} method).  (A {@code null} value is
      *         permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since  1.4
@@ -86,14 +86,14 @@
 
     /**
      * Constructs a new exception with the specified cause and a detail
-     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
-     * typically contains the class and detail message of <tt>cause</tt>).
+     * message of {@code (cause==null ? null : cause.toString())} (which
+     * typically contains the class and detail message of {@code cause}).
      * This constructor is useful for exceptions that are little more than
      * wrappers for other throwables (for example, {@link
      * java.security.PrivilegedActionException}).
      *
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link #getCause()} method).  (A <tt>null</tt> value is
+     *         {@link #getCause()} method).  (A {@code null} value is
      *         permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since  1.4
--- a/jdk/src/java.base/share/classes/java/lang/IllegalArgumentException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/IllegalArgumentException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -63,7 +63,7 @@
      * @param  message the detail message (which is saved for later retrieval
      *         by the {@link Throwable#getMessage()} method).
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link Throwable#getCause()} method).  (A <tt>null</tt> value
+     *         {@link Throwable#getCause()} method).  (A {@code null} value
      *         is permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since 1.5
@@ -74,14 +74,14 @@
 
     /**
      * Constructs a new exception with the specified cause and a detail
-     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
-     * typically contains the class and detail message of <tt>cause</tt>).
+     * message of {@code (cause==null ? null : cause.toString())} (which
+     * typically contains the class and detail message of {@code cause}).
      * This constructor is useful for exceptions that are little more than
      * wrappers for other throwables (for example, {@link
      * java.security.PrivilegedActionException}).
      *
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link Throwable#getCause()} method).  (A <tt>null</tt> value is
+     *         {@link Throwable#getCause()} method).  (A {@code null} value is
      *         permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since  1.5
--- a/jdk/src/java.base/share/classes/java/lang/IllegalStateException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/IllegalStateException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -66,7 +66,7 @@
      * @param  message the detail message (which is saved for later retrieval
      *         by the {@link Throwable#getMessage()} method).
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link Throwable#getCause()} method).  (A <tt>null</tt> value
+     *         {@link Throwable#getCause()} method).  (A {@code null} value
      *         is permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since 1.5
@@ -77,14 +77,14 @@
 
     /**
      * Constructs a new exception with the specified cause and a detail
-     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
-     * typically contains the class and detail message of <tt>cause</tt>).
+     * message of {@code (cause==null ? null : cause.toString())} (which
+     * typically contains the class and detail message of {@code cause}).
      * This constructor is useful for exceptions that are little more than
      * wrappers for other throwables (for example, {@link
      * java.security.PrivilegedActionException}).
      *
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link Throwable#getCause()} method).  (A <tt>null</tt> value is
+     *         {@link Throwable#getCause()} method).  (A {@code null} value is
      *         permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since  1.5
--- a/jdk/src/java.base/share/classes/java/lang/InheritableThreadLocal.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/InheritableThreadLocal.java	Mon Aug 10 14:05:37 2015 +0300
@@ -27,12 +27,12 @@
 import java.lang.ref.*;
 
 /**
- * This class extends <tt>ThreadLocal</tt> to provide inheritance of values
+ * This class extends {@code ThreadLocal} to provide inheritance of values
  * from parent thread to child thread: when a child thread is created, the
  * child receives initial values for all inheritable thread-local variables
  * for which the parent has values.  Normally the child's values will be
  * identical to the parent's; however, the child's value can be made an
- * arbitrary function of the parent's by overriding the <tt>childValue</tt>
+ * arbitrary function of the parent's by overriding the {@code childValue}
  * method in this class.
  *
  * <p>Inheritable thread-local variables are used in preference to
--- a/jdk/src/java.base/share/classes/java/lang/Readable.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Readable.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /**
- * A <tt>Readable</tt> is a source of characters. Characters from
- * a <tt>Readable</tt> are made available to callers of the read
+ * A {@code Readable} is a source of characters. Characters from
+ * a {@code Readable} are made available to callers of the read
  * method via a {@link java.nio.CharBuffer CharBuffer}.
  *
  * @since 1.5
--- a/jdk/src/java.base/share/classes/java/lang/RuntimeException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/RuntimeException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -71,7 +71,7 @@
      * @param  message the detail message (which is saved for later retrieval
      *         by the {@link #getMessage()} method).
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link #getCause()} method).  (A <tt>null</tt> value is
+     *         {@link #getCause()} method).  (A {@code null} value is
      *         permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since  1.4
@@ -81,13 +81,13 @@
     }
 
     /** Constructs a new runtime exception with the specified cause and a
-     * detail message of <tt>(cause==null ? null : cause.toString())</tt>
+     * detail message of {@code (cause==null ? null : cause.toString())}
      * (which typically contains the class and detail message of
-     * <tt>cause</tt>).  This constructor is useful for runtime exceptions
+     * {@code cause}).  This constructor is useful for runtime exceptions
      * that are little more than wrappers for other throwables.
      *
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link #getCause()} method).  (A <tt>null</tt> value is
+     *         {@link #getCause()} method).  (A {@code null} value is
      *         permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since  1.4
--- a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java	Mon Aug 10 14:05:37 2015 +0300
@@ -172,9 +172,8 @@
  * <tr>
  *   <td>modifyThread</td>
  *   <td>Modification of threads, e.g., via calls to Thread
- * <tt>interrupt</tt>, <tt>stop</tt>, <tt>suspend</tt>,
- * <tt>resume</tt>, <tt>setDaemon</tt>, <tt>setPriority</tt>,
- * <tt>setName</tt> and <tt>setUncaughtExceptionHandler</tt>
+ * {@code interrupt, stop, suspend, resume, setDaemon, setPriority,
+ * setName} and {@code setUncaughtExceptionHandler}
  * methods</td>
  * <td>This allows an attacker to modify the behaviour of
  * any thread in the system.</td>
--- a/jdk/src/java.base/share/classes/java/lang/SecurityException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/SecurityException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -36,14 +36,14 @@
     private static final long serialVersionUID = 6878364983674394167L;
 
     /**
-     * Constructs a <code>SecurityException</code> with no detail  message.
+     * Constructs a {@code SecurityException} with no detail message.
      */
     public SecurityException() {
         super();
     }
 
     /**
-     * Constructs a <code>SecurityException</code> with the specified
+     * Constructs a {@code SecurityException} with the specified
      * detail message.
      *
      * @param   s   the detail message.
@@ -53,13 +53,13 @@
     }
 
     /**
-     * Creates a <code>SecurityException</code> with the specified
+     * Creates a {@code SecurityException} with the specified
      * detail message and cause.
      *
      * @param message the detail message (which is saved for later retrieval
      *        by the {@link #getMessage()} method).
      * @param cause the cause (which is saved for later retrieval by the
-     *        {@link #getCause()} method).  (A <tt>null</tt> value is permitted,
+     *        {@link #getCause()} method).  (A {@code null} value is permitted,
      *        and indicates that the cause is nonexistent or unknown.)
      * @since 1.5
      */
@@ -68,13 +68,13 @@
     }
 
     /**
-     * Creates a <code>SecurityException</code> with the specified cause
-     * and a detail message of <tt>(cause==null ? null : cause.toString())</tt>
+     * Creates a {@code SecurityException} with the specified cause
+     * and a detail message of {@code (cause==null ? null : cause.toString())}
      * (which typically contains the class and detail message of
-     * <tt>cause</tt>).
+     * {@code cause}).
      *
      * @param cause the cause (which is saved for later retrieval by the
-     *        {@link #getCause()} method).  (A <tt>null</tt> value is permitted,
+     *        {@link #getCause()} method).  (A {@code null} value is permitted,
      *        and indicates that the cause is nonexistent or unknown.)
      * @since 1.5
      */
--- a/jdk/src/java.base/share/classes/java/lang/String.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/String.java	Mon Aug 10 14:05:37 2015 +0300
@@ -87,7 +87,7 @@
  * string concatenation and conversion, see Gosling, Joy, and Steele,
  * <i>The Java Language Specification</i>.
  *
- * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor
+ * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
  * or method in this class will cause a {@link NullPointerException} to be
  * thrown.
  *
@@ -1135,7 +1135,7 @@
      * or both. If they have different characters at one or more index
      * positions, let <i>k</i> be the smallest such index; then the string
      * whose character at position <i>k</i> has the smaller value, as
-     * determined by using the &lt; operator, lexicographically precedes the
+     * determined by using the {@code <} operator, lexicographically precedes the
      * other string. In this case, {@code compareTo} returns the
      * difference of the two character values at position {@code k} in
      * the two string -- that is, the value:
--- a/jdk/src/java.base/share/classes/java/lang/System.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/System.java	Mon Aug 10 14:05:37 2015 +0300
@@ -205,7 +205,7 @@
      * Returns the unique {@link java.io.Console Console} object associated
      * with the current Java virtual machine, if any.
      *
-     * @return  The system console, if any, otherwise <tt>null</tt>.
+     * @return  The system console, if any, otherwise {@code null}.
      *
      * @since   1.6
      */
@@ -232,7 +232,7 @@
      * inheritedChannel}, this method may return other kinds of
      * channels in the future.
      *
-     * @return  The inherited channel, if any, otherwise <tt>null</tt>.
+     * @return  The inherited channel, if any, otherwise {@code null}.
      *
      * @throws  IOException
      *          If an I/O error occurs
--- a/jdk/src/java.base/share/classes/java/lang/Thread.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Thread.java	Mon Aug 10 14:05:37 2015 +0300
@@ -616,7 +616,7 @@
      * Similarly, specifying a lower value may allow a greater number of
      * threads to exist concurrently without throwing an {@link
      * OutOfMemoryError} (or other internal error).  The details of
-     * the relationship between the value of the <tt>stackSize</tt> parameter
+     * the relationship between the value of the {@code stackSize} parameter
      * and the maximum recursion depth and concurrency level are
      * platform-dependent.  <b>On some platforms, the value of the
      * {@code stackSize} parameter may have no effect whatsoever.</b>
@@ -1476,7 +1476,7 @@
     }
 
     /**
-     * Returns <tt>true</tt> if and only if the current thread holds the
+     * Returns {@code true} if and only if the current thread holds the
      * monitor lock on the specified object.
      *
      * <p>This method is designed to allow a program to assert that
@@ -1486,8 +1486,8 @@
      * </pre>
      *
      * @param  obj the object on which to test lock ownership
-     * @throws NullPointerException if obj is <tt>null</tt>
-     * @return <tt>true</tt> if the current thread holds the monitor lock on
+     * @throws NullPointerException if obj is {@code null}
+     * @return {@code true} if the current thread holds the monitor lock on
      *         the specified object.
      * @since 1.4
      */
@@ -1509,8 +1509,8 @@
      *
      * <p>If there is a security manager, and this thread is not
      * the current thread, then the security manager's
-     * <tt>checkPermission</tt> method is called with a
-     * <tt>RuntimePermission("getStackTrace")</tt> permission
+     * {@code checkPermission} method is called with a
+     * {@code RuntimePermission("getStackTrace")} permission
      * to see if it's ok to get the stack trace.
      *
      * <p>Some virtual machines may, under some circumstances, omit one
@@ -1519,12 +1519,12 @@
      * this thread is permitted to return a zero-length array from this
      * method.
      *
-     * @return an array of <tt>StackTraceElement</tt>,
+     * @return an array of {@code StackTraceElement},
      * each represents one stack frame.
      *
      * @throws SecurityException
      *        if a security manager exists and its
-     *        <tt>checkPermission</tt> method doesn't allow
+     *        {@code checkPermission} method doesn't allow
      *        getting the stack trace of thread.
      * @see SecurityManager#checkPermission
      * @see RuntimePermission
@@ -1562,8 +1562,8 @@
     /**
      * Returns a map of stack traces for all live threads.
      * The map keys are threads and each map value is an array of
-     * <tt>StackTraceElement</tt> that represents the stack dump
-     * of the corresponding <tt>Thread</tt>.
+     * {@code StackTraceElement} that represents the stack dump
+     * of the corresponding {@code Thread}.
      * The returned stack traces are in the format specified for
      * the {@link #getStackTrace getStackTrace} method.
      *
@@ -1574,18 +1574,18 @@
      * no stack trace information about a thread.
      *
      * <p>If there is a security manager, then the security manager's
-     * <tt>checkPermission</tt> method is called with a
-     * <tt>RuntimePermission("getStackTrace")</tt> permission as well as
-     * <tt>RuntimePermission("modifyThreadGroup")</tt> permission
+     * {@code checkPermission} method is called with a
+     * {@code RuntimePermission("getStackTrace")} permission as well as
+     * {@code RuntimePermission("modifyThreadGroup")} permission
      * to see if it is ok to get the stack trace of all threads.
      *
-     * @return a <tt>Map</tt> from <tt>Thread</tt> to an array of
-     * <tt>StackTraceElement</tt> that represents the stack trace of
+     * @return a {@code Map} from {@code Thread} to an array of
+     * {@code StackTraceElement} that represents the stack trace of
      * the corresponding thread.
      *
      * @throws SecurityException
      *        if a security manager exists and its
-     *        <tt>checkPermission</tt> method doesn't allow
+     *        {@code checkPermission} method doesn't allow
      *        getting the stack trace of thread.
      * @see #getStackTrace
      * @see SecurityManager#checkPermission
@@ -1693,7 +1693,7 @@
 
     /**
      * Returns the identifier of this Thread.  The thread ID is a positive
-     * <tt>long</tt> number generated when this thread was created.
+     * {@code long} number generated when this thread was created.
      * The thread ID is unique and remains unchanged during its lifetime.
      * When a thread is terminated, this thread ID may be reused.
      *
@@ -1774,10 +1774,10 @@
          * <p>A thread in the waiting state is waiting for another thread to
          * perform a particular action.
          *
-         * For example, a thread that has called <tt>Object.wait()</tt>
+         * For example, a thread that has called {@code Object.wait()}
          * on an object is waiting for another thread to call
-         * <tt>Object.notify()</tt> or <tt>Object.notifyAll()</tt> on
-         * that object. A thread that has called <tt>Thread.join()</tt>
+         * {@code Object.notify()} or {@code Object.notifyAll()} on
+         * that object. A thread that has called {@code Thread.join()}
          * is waiting for a specified thread to terminate.
          */
         WAITING,
@@ -1819,17 +1819,17 @@
     // Added in JSR-166
 
     /**
-     * Interface for handlers invoked when a <tt>Thread</tt> abruptly
+     * Interface for handlers invoked when a {@code Thread} abruptly
      * terminates due to an uncaught exception.
      * <p>When a thread is about to terminate due to an uncaught exception
      * the Java Virtual Machine will query the thread for its
-     * <tt>UncaughtExceptionHandler</tt> using
+     * {@code UncaughtExceptionHandler} using
      * {@link #getUncaughtExceptionHandler} and will invoke the handler's
-     * <tt>uncaughtException</tt> method, passing the thread and the
+     * {@code uncaughtException} method, passing the thread and the
      * exception as arguments.
-     * If a thread has not had its <tt>UncaughtExceptionHandler</tt>
-     * explicitly set, then its <tt>ThreadGroup</tt> object acts as its
-     * <tt>UncaughtExceptionHandler</tt>. If the <tt>ThreadGroup</tt> object
+     * If a thread has not had its {@code UncaughtExceptionHandler}
+     * explicitly set, then its {@code ThreadGroup} object acts as its
+     * {@code UncaughtExceptionHandler}. If the {@code ThreadGroup} object
      * has no
      * special requirements for dealing with the exception, it can forward
      * the invocation to the {@linkplain #getDefaultUncaughtExceptionHandler
@@ -1869,8 +1869,8 @@
      * uncaught exception handler. If the thread does not have an explicit
      * uncaught exception handler set, and the thread's thread group
      * (including parent thread groups)  does not specialize its
-     * <tt>uncaughtException</tt> method, then the default handler's
-     * <tt>uncaughtException</tt> method will be invoked.
+     * {@code uncaughtException} method, then the default handler's
+     * {@code uncaughtException} method will be invoked.
      * <p>By setting the default uncaught exception handler, an application
      * can change the way in which uncaught exceptions are handled (such as
      * logging to a specific device, or file) for those threads that would
@@ -1878,15 +1878,14 @@
      * provided.
      *
      * <p>Note that the default uncaught exception handler should not usually
-     * defer to the thread's <tt>ThreadGroup</tt> object, as that could cause
+     * defer to the thread's {@code ThreadGroup} object, as that could cause
      * infinite recursion.
      *
      * @param eh the object to use as the default uncaught exception handler.
-     * If <tt>null</tt> then there is no default handler.
+     * If {@code null} then there is no default handler.
      *
-     * @throws SecurityException if a security manager is present and it
-     *         denies <tt>{@link RuntimePermission}
-     *         (&quot;setDefaultUncaughtExceptionHandler&quot;)</tt>
+     * @throws SecurityException if a security manager is present and it denies
+     *         {@link RuntimePermission}{@code ("setDefaultUncaughtExceptionHandler")}
      *
      * @see #setUncaughtExceptionHandler
      * @see #getUncaughtExceptionHandler
@@ -1906,7 +1905,7 @@
 
     /**
      * Returns the default handler invoked when a thread abruptly terminates
-     * due to an uncaught exception. If the returned value is <tt>null</tt>,
+     * due to an uncaught exception. If the returned value is {@code null},
      * there is no default.
      * @since 1.5
      * @see #setDefaultUncaughtExceptionHandler
@@ -1920,8 +1919,8 @@
      * Returns the handler invoked when this thread abruptly terminates
      * due to an uncaught exception. If this thread has not had an
      * uncaught exception handler explicitly set then this thread's
-     * <tt>ThreadGroup</tt> object is returned, unless this thread
-     * has terminated, in which case <tt>null</tt> is returned.
+     * {@code ThreadGroup} object is returned, unless this thread
+     * has terminated, in which case {@code null} is returned.
      * @since 1.5
      * @return the uncaught exception handler for this thread
      */
@@ -1935,10 +1934,10 @@
      * due to an uncaught exception.
      * <p>A thread can take full control of how it responds to uncaught
      * exceptions by having its uncaught exception handler explicitly set.
-     * If no such handler is set then the thread's <tt>ThreadGroup</tt>
+     * If no such handler is set then the thread's {@code ThreadGroup}
      * object acts as its handler.
      * @param eh the object to use as this thread's uncaught exception
-     * handler. If <tt>null</tt> then this thread has no explicit handler.
+     * handler. If {@code null} then this thread has no explicit handler.
      * @throws  SecurityException  if the current thread is not allowed to
      *          modify this thread.
      * @see #setDefaultUncaughtExceptionHandler
--- a/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java	Mon Aug 10 14:05:37 2015 +0300
@@ -728,7 +728,7 @@
      * @see        java.lang.ThreadGroup#checkAccess()
      * @since      1.0
      * @deprecated    This method is used solely in conjunction with
-     *      <tt>Thread.suspend</tt> and <tt>ThreadGroup.suspend</tt>,
+     *       {@code Thread.suspend} and {@code ThreadGroup.suspend},
      *       both of which have been deprecated, as they are inherently
      *       deadlock-prone.  See {@link Thread#suspend} for details.
      */
--- a/jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -29,7 +29,7 @@
  * Thrown when an application tries to access a type using a string
  * representing the type's name, but no definition for the type with
  * the specified name can be found.   This exception differs from
- * {@link ClassNotFoundException} in that <tt>ClassNotFoundException</tt> is a
+ * {@link ClassNotFoundException} in that {@code ClassNotFoundException} is a
  * checked exception, whereas this exception is unchecked.
  *
  * <p>Note that this exception may be used when undefined type variables
@@ -49,12 +49,12 @@
     private String typeName;
 
     /**
-     * Constructs a <tt>TypeNotPresentException</tt> for the named type
+     * Constructs a {@code TypeNotPresentException} for the named type
      * with the specified cause.
      *
      * @param typeName the fully qualified name of the unavailable type
      * @param cause the exception that was thrown when the system attempted to
-     *    load the named type, or <tt>null</tt> if unavailable or inapplicable
+     *    load the named type, or {@code null} if unavailable or inapplicable
      */
     public TypeNotPresentException(String typeName, Throwable cause) {
         super("Type " + typeName + " not present", cause);
--- a/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -63,7 +63,7 @@
      * @param  message the detail message (which is saved for later retrieval
      *         by the {@link Throwable#getMessage()} method).
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link Throwable#getCause()} method).  (A <tt>null</tt> value
+     *         {@link Throwable#getCause()} method).  (A {@code null} value
      *         is permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since 1.5
@@ -74,14 +74,14 @@
 
     /**
      * Constructs a new exception with the specified cause and a detail
-     * message of <tt>(cause==null ? null : cause.toString())</tt> (which
-     * typically contains the class and detail message of <tt>cause</tt>).
+     * message of {@code (cause==null ? null : cause.toString())} (which
+     * typically contains the class and detail message of {@code cause}).
      * This constructor is useful for exceptions that are little more than
      * wrappers for other throwables (for example, {@link
      * java.security.PrivilegedActionException}).
      *
      * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link Throwable#getCause()} method).  (A <tt>null</tt> value is
+     *         {@link Throwable#getCause()} method).  (A {@code null} value is
      *         permitted, and indicates that the cause is nonexistent or
      *         unknown.)
      * @since  1.5
--- a/jdk/src/java.base/share/classes/java/lang/annotation/Annotation.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/annotation/Annotation.java	Mon Aug 10 14:05:37 2015 +0300
@@ -50,28 +50,28 @@
      * to the corresponding member of this annotation, as defined below:
      * <ul>
      *    <li>Two corresponding primitive typed members whose values are
-     *    <tt>x</tt> and <tt>y</tt> are considered equal if <tt>x == y</tt>,
-     *    unless their type is <tt>float</tt> or <tt>double</tt>.
+     *    {@code x} and {@code y} are considered equal if {@code x == y},
+     *    unless their type is {@code float} or {@code double}.
      *
-     *    <li>Two corresponding <tt>float</tt> members whose values
-     *    are <tt>x</tt> and <tt>y</tt> are considered equal if
-     *    <tt>Float.valueOf(x).equals(Float.valueOf(y))</tt>.
-     *    (Unlike the <tt>==</tt> operator, NaN is considered equal
-     *    to itself, and <tt>0.0f</tt> unequal to <tt>-0.0f</tt>.)
+     *    <li>Two corresponding {@code float} members whose values
+     *    are {@code x} and {@code y} are considered equal if
+     *    {@code Float.valueOf(x).equals(Float.valueOf(y))}.
+     *    (Unlike the {@code ==} operator, NaN is considered equal
+     *    to itself, and {@code 0.0f} unequal to {@code -0.0f}.)
      *
-     *    <li>Two corresponding <tt>double</tt> members whose values
-     *    are <tt>x</tt> and <tt>y</tt> are considered equal if
-     *    <tt>Double.valueOf(x).equals(Double.valueOf(y))</tt>.
-     *    (Unlike the <tt>==</tt> operator, NaN is considered equal
-     *    to itself, and <tt>0.0</tt> unequal to <tt>-0.0</tt>.)
+     *    <li>Two corresponding {@code double} members whose values
+     *    are {@code x} and {@code y} are considered equal if
+     *    {@code Double.valueOf(x).equals(Double.valueOf(y))}.
+     *    (Unlike the {@code ==} operator, NaN is considered equal
+     *    to itself, and {@code 0.0} unequal to {@code -0.0}.)
      *
-     *    <li>Two corresponding <tt>String</tt>, <tt>Class</tt>, enum, or
-     *    annotation typed members whose values are <tt>x</tt> and <tt>y</tt>
-     *    are considered equal if <tt>x.equals(y)</tt>.  (Note that this
+     *    <li>Two corresponding {@code String}, {@code Class}, enum, or
+     *    annotation typed members whose values are {@code x} and {@code y}
+     *    are considered equal if {@code x.equals(y)}.  (Note that this
      *    definition is recursive for annotation typed members.)
      *
-     *    <li>Two corresponding array typed members <tt>x</tt> and <tt>y</tt>
-     *    are considered equal if <tt>Arrays.equals(x, y)</tt>, for the
+     *    <li>Two corresponding array typed members {@code x} and {@code y}
+     *    are considered equal if {@code Arrays.equals(x, y)}, for the
      *    appropriate overloading of {@link java.util.Arrays#equals}.
      * </ul>
      *
@@ -93,16 +93,16 @@
      *
      * <p>The hash code of a member-value depends on its type:
      * <ul>
-     * <li>The hash code of a primitive value <tt><i>v</i></tt> is equal to
-     *     <tt><i>WrapperType</i>.valueOf(<i>v</i>).hashCode()</tt>, where
-     *     <tt><i>WrapperType</i></tt> is the wrapper type corresponding
-     *     to the primitive type of <tt><i>v</i></tt> ({@link Byte},
+     * <li>The hash code of a primitive value <i>{@code v}</i> is equal to
+     *     <code><i>WrapperType</i>.valueOf(<i>v</i>).hashCode()</code>, where
+     *     <i>{@code WrapperType}</i> is the wrapper type corresponding
+     *     to the primitive type of <i>{@code v}</i> ({@link Byte},
      *     {@link Character}, {@link Double}, {@link Float}, {@link Integer},
      *     {@link Long}, {@link Short}, or {@link Boolean}).
      *
      * <li>The hash code of a string, enum, class, or annotation member-value
-     I     <tt><i>v</i></tt> is computed as by calling
-     *     <tt><i>v</i>.hashCode()</tt>.  (In the case of annotation
+     I     <i>{@code v}</i> is computed as by calling
+     *     <code><i>v</i>.hashCode()</code>.  (In the case of annotation
      *     member values, this is a recursive definition.)
      *
      * <li>The hash code of an array member-value is computed by calling
--- a/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationFormatError.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationFormatError.java	Mon Aug 10 14:05:37 2015 +0300
@@ -40,7 +40,7 @@
     private static final long serialVersionUID = -4256701562333669892L;
 
     /**
-     * Constructs a new <tt>AnnotationFormatError</tt> with the specified
+     * Constructs a new {@code AnnotationFormatError} with the specified
      * detail message.
      *
      * @param   message   the detail message.
@@ -50,13 +50,13 @@
     }
 
     /**
-     * Constructs a new <tt>AnnotationFormatError</tt> with the specified
+     * Constructs a new {@code AnnotationFormatError} with the specified
      * detail message and cause.  Note that the detail message associated
-     * with <code>cause</code> is <i>not</i> automatically incorporated in
+     * with {@code cause} is <i>not</i> automatically incorporated in
      * this error's detail message.
      *
      * @param  message the detail message
-     * @param  cause the cause (A <tt>null</tt> value is permitted, and
+     * @param  cause the cause (A {@code null} value is permitted, and
      *     indicates that the cause is nonexistent or unknown.)
      */
     public AnnotationFormatError(String message, Throwable cause) {
@@ -65,12 +65,12 @@
 
 
     /**
-     * Constructs a new <tt>AnnotationFormatError</tt> with the specified
+     * Constructs a new {@code AnnotationFormatError} with the specified
      * cause and a detail message of
-     * <tt>(cause == null ? null : cause.toString())</tt> (which
-     * typically contains the class and detail message of <tt>cause</tt>).
+     * {@code (cause == null ? null : cause.toString())} (which
+     * typically contains the class and detail message of {@code cause}).
      *
-     * @param  cause the cause (A <tt>null</tt> value is permitted, and
+     * @param  cause the cause (A {@code null} value is permitted, and
      *     indicates that the cause is nonexistent or unknown.)
      */
     public AnnotationFormatError(Throwable cause) {
--- a/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -42,7 +42,7 @@
     private static final long serialVersionUID = 8125925355765570191L;
 
     /**
-     * The <tt>Method</tt> object for the annotation element.
+     * The {@code Method} object for the annotation element.
      */
     private final Method element;
 
@@ -57,7 +57,7 @@
      * Constructs an AnnotationTypeMismatchException for the specified
      * annotation type element and found data type.
      *
-     * @param element the <tt>Method</tt> object for the annotation element
+     * @param element the {@code Method} object for the annotation element
      * @param foundType the (erroneous) type of data found in the annotation.
      *        This string may, but is not required to, contain the value
      *        as well.  The exact format of the string is unspecified.
@@ -70,9 +70,9 @@
     }
 
     /**
-     * Returns the <tt>Method</tt> object for the incorrectly typed element.
+     * Returns the {@code Method} object for the incorrectly typed element.
      *
-     * @return the <tt>Method</tt> object for the incorrectly typed element
+     * @return the {@code Method} object for the incorrectly typed element
      */
     public Method element() {
         return this.element;
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java	Mon Aug 10 14:05:37 2015 +0300
@@ -746,7 +746,7 @@
 
     /**
      * Compares the specified object with this type for equality.
-     * That is, it returns <tt>true</tt> if and only if the specified object
+     * That is, it returns {@code true} if and only if the specified object
      * is also a method type with exactly the same parameters and return type.
      * @param x object to compare
      * @see Object#equals(Object)
--- a/jdk/src/java.base/share/classes/java/lang/ref/PhantomReference.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/ref/PhantomReference.java	Mon Aug 10 14:05:37 2015 +0300
@@ -38,8 +38,8 @@
  * time or at some later time it will enqueue the reference.
  *
  * <p> In order to ensure that a reclaimable object remains so, the referent of
- * a phantom reference may not be retrieved: The <code>get</code> method of a
- * phantom reference always returns <code>null</code>.
+ * a phantom reference may not be retrieved: The {@code get} method of a
+ * phantom reference always returns {@code null}.
  *
  * <p> Unlike soft and weak references, phantom references are not
  * automatically cleared by the garbage collector as they are enqueued.  An
@@ -55,9 +55,9 @@
     /**
      * Returns this reference object's referent.  Because the referent of a
      * phantom reference is always inaccessible, this method always returns
-     * <code>null</code>.
+     * {@code null}.
      *
-     * @return  <code>null</code>
+     * @return {@code null}
      */
     public T get() {
         return null;
@@ -67,14 +67,14 @@
      * Creates a new phantom reference that refers to the given object and
      * is registered with the given queue.
      *
-     * <p> It is possible to create a phantom reference with a <tt>null</tt>
-     * queue, but such a reference is completely useless: Its <tt>get</tt>
+     * <p> It is possible to create a phantom reference with a {@code null}
+     * queue, but such a reference is completely useless: Its {@code get}
      * method will always return null and, since it does not have a queue, it
      * will never be enqueued.
      *
      * @param referent the object the new phantom reference will refer to
      * @param q the queue with which the reference is to be registered,
-     *          or <tt>null</tt> if registration is not required
+     *          or {@code null} if registration is not required
      */
     public PhantomReference(T referent, ReferenceQueue<? super T> q) {
         super(referent, q);
--- a/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java	Mon Aug 10 14:05:37 2015 +0300
@@ -103,10 +103,10 @@
     /**
      * Polls this queue to see if a reference object is available.  If one is
      * available without further delay then it is removed from the queue and
-     * returned.  Otherwise this method immediately returns <tt>null</tt>.
+     * returned.  Otherwise this method immediately returns {@code null}.
      *
      * @return  A reference object, if one was immediately available,
-     *          otherwise <code>null</code>
+     *          otherwise {@code null}
      */
     public Reference<? extends T> poll() {
         if (head == null)
@@ -123,12 +123,12 @@
      * <p> This method does not offer real-time guarantees: It schedules the
      * timeout as if by invoking the {@link Object#wait(long)} method.
      *
-     * @param  timeout  If positive, block for up to <code>timeout</code>
+     * @param  timeout  If positive, block for up to {@code timeout}
      *                  milliseconds while waiting for a reference to be
      *                  added to this queue.  If zero, block indefinitely.
      *
      * @return  A reference object, if one was available within the specified
-     *          timeout period, otherwise <code>null</code>
+     *          timeout period, otherwise {@code null}
      *
      * @throws  IllegalArgumentException
      *          If the value of the timeout argument is negative
--- a/jdk/src/java.base/share/classes/java/lang/ref/SoftReference.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/ref/SoftReference.java	Mon Aug 10 14:05:37 2015 +0300
@@ -42,7 +42,7 @@
  *
  * <p> All soft references to softly-reachable objects are guaranteed to have
  * been cleared before the virtual machine throws an
- * <code>OutOfMemoryError</code>.  Otherwise no constraints are placed upon the
+ * {@code OutOfMemoryError}.  Otherwise no constraints are placed upon the
  * time at which a soft reference will be cleared or the order in which a set
  * of such references to different objects will be cleared.  Virtual machine
  * implementations are, however, encouraged to bias against clearing
@@ -92,7 +92,7 @@
      *
      * @param referent object the new soft reference will refer to
      * @param q the queue with which the reference is to be registered,
-     *          or <tt>null</tt> if registration is not required
+     *          or {@code null} if registration is not required
      *
      */
     public SoftReference(T referent, ReferenceQueue<? super T> q) {
@@ -103,10 +103,10 @@
     /**
      * Returns this reference object's referent.  If this reference object has
      * been cleared, either by the program or by the garbage collector, then
-     * this method returns <code>null</code>.
+     * this method returns {@code null}.
      *
      * @return   The object to which this reference refers, or
-     *           <code>null</code> if this reference object has been cleared
+     *           {@code null} if this reference object has been cleared
      */
     public T get() {
         T o = super.get();
--- a/jdk/src/java.base/share/classes/java/lang/ref/WeakReference.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/ref/WeakReference.java	Mon Aug 10 14:05:37 2015 +0300
@@ -63,7 +63,7 @@
      *
      * @param referent object the new weak reference will refer to
      * @param q the queue with which the reference is to be registered,
-     *          or <tt>null</tt> if registration is not required
+     *          or {@code null} if registration is not required
      */
     public WeakReference(T referent, ReferenceQueue<? super T> q) {
         super(referent, q);
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Mon Aug 10 14:05:37 2015 +0300
@@ -286,9 +286,9 @@
      * followed by the fully-qualified name of the declaring class,
      * followed by a parenthesized, comma-separated list of the
      * constructor's formal parameter types.  For example:
-     * <pre>
+     * <pre>{@code
      *    public java.util.Hashtable(int,float)
-     * </pre>
+     * }</pre>
      *
      * <p>The only possible modifiers for constructors are the access
      * modifiers {@code public}, {@code protected} or
@@ -322,8 +322,8 @@
      *
      * If this constructor was declared to take a variable number of
      * arguments, instead of denoting the last parameter as
-     * "<tt><i>Type</i>[]</tt>", it is denoted as
-     * "<tt><i>Type</i>...</tt>".
+     * "<code><i>Type</i>[]</code>", it is denoted as
+     * "<code><i>Type</i>...</code>".
      *
      * A space is used to separate access modifiers from one another
      * and from the type parameters or return type.  If there are no
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Mon Aug 10 14:05:37 2015 +0300
@@ -387,8 +387,8 @@
      *
      * If this method was declared to take a variable number of
      * arguments, instead of denoting the last parameter as
-     * "<tt><i>Type</i>[]</tt>", it is denoted as
-     * "<tt><i>Type</i>...</tt>".
+     * "<code><i>Type</i>[]</code>", it is denoted as
+     * "<code><i>Type</i>...</code>".
      *
      * A space is used to separate access modifiers from one another
      * and from the type parameters or return type.  If there are no
--- a/jdk/src/java.base/share/classes/java/math/BigDecimal.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/math/BigDecimal.java	Mon Aug 10 14:05:37 2015 +0300
@@ -40,7 +40,7 @@
  * decimal point.  If negative, the unscaled value of the number is
  * multiplied by ten to the power of the negation of the scale.  The
  * value of the number represented by the {@code BigDecimal} is
- * therefore <tt>(unscaledValue &times; 10<sup>-scale</sup>)</tt>.
+ * therefore <code>(unscaledValue &times; 10<sup>-scale</sup>)</code>.
  *
  * <p>The {@code BigDecimal} class provides operations for
  * arithmetic, scale manipulation, rounding, comparison, hashing, and
@@ -709,8 +709,8 @@
     /**
      * Translates the string representation of a {@code BigDecimal}
      * into a {@code BigDecimal}.  The string representation consists
-     * of an optional sign, {@code '+'} (<tt> '&#92;u002B'</tt>) or
-     * {@code '-'} (<tt>'&#92;u002D'</tt>), followed by a sequence of
+     * of an optional sign, {@code '+'} (<code> '&#92;u002B'</code>) or
+     * {@code '-'} (<code>'&#92;u002D'</code>), followed by a sequence of
      * zero or more decimal digits ("the integer"), optionally
      * followed by a fraction, optionally followed by an exponent.
      *
@@ -721,7 +721,7 @@
      * <i>significand</i>.
      *
      * <p>The exponent consists of the character {@code 'e'}
-     * (<tt>'&#92;u0065'</tt>) or {@code 'E'} (<tt>'&#92;u0045'</tt>)
+     * (<code>'&#92;u0065'</code>) or {@code 'E'} (<code>'&#92;u0045'</code>)
      * followed by one or more decimal digits.  The value of the
      * exponent must lie between -{@link Integer#MAX_VALUE} ({@link
      * Integer#MIN_VALUE}+1) and {@link Integer#MAX_VALUE}, inclusive.
@@ -834,7 +834,7 @@
      * is the exact decimal representation of the {@code double}'s
      * binary floating-point value.  The scale of the returned
      * {@code BigDecimal} is the smallest value such that
-     * <tt>(10<sup>scale</sup> &times; val)</tt> is an integer.
+     * <code>(10<sup>scale</sup> &times; val)</code> is an integer.
      * <p>
      * <b>Notes:</b>
      * <ol>
@@ -857,7 +857,7 @@
      * creates a {@code BigDecimal} which is <i>exactly</i> equal to
      * 0.1, as one would expect.  Therefore, it is generally
      * recommended that the {@linkplain #BigDecimal(String)
-     * <tt>String</tt> constructor} be used in preference to this one.
+     * String constructor} be used in preference to this one.
      *
      * <li>
      * When a {@code double} must be used as a source for a
@@ -881,7 +881,7 @@
      * Translates a {@code double} into a {@code BigDecimal}, with
      * rounding according to the context settings.  The scale of the
      * {@code BigDecimal} is the smallest value such that
-     * <tt>(10<sup>scale</sup> &times; val)</tt> is an integer.
+     * <code>(10<sup>scale</sup> &times; val)</code> is an integer.
      *
      * <p>The results of this constructor can be somewhat unpredictable
      * and its use is generally not recommended; see the notes under
@@ -1010,7 +1010,7 @@
      * Translates a {@code BigInteger} unscaled value and an
      * {@code int} scale into a {@code BigDecimal}.  The value of
      * the {@code BigDecimal} is
-     * <tt>(unscaledVal &times; 10<sup>-scale</sup>)</tt>.
+     * <code>(unscaledVal &times; 10<sup>-scale</sup>)</code>.
      *
      * @param unscaledVal unscaled value of the {@code BigDecimal}.
      * @param scale scale of the {@code BigDecimal}.
@@ -1026,8 +1026,8 @@
      * Translates a {@code BigInteger} unscaled value and an
      * {@code int} scale into a {@code BigDecimal}, with rounding
      * according to the context settings.  The value of the
-     * {@code BigDecimal} is <tt>(unscaledVal &times;
-     * 10<sup>-scale</sup>)</tt>, rounded according to the
+     * {@code BigDecimal} is <code>(unscaledVal &times;
+     * 10<sup>-scale</sup>)</code>, rounded according to the
      * {@code precision} and rounding mode settings.
      *
      * @param  unscaledVal unscaled value of the {@code BigDecimal}.
@@ -1196,7 +1196,7 @@
      * @param unscaledVal unscaled value of the {@code BigDecimal}.
      * @param scale scale of the {@code BigDecimal}.
      * @return a {@code BigDecimal} whose value is
-     *         <tt>(unscaledVal &times; 10<sup>-scale</sup>)</tt>.
+     *         <code>(unscaledVal &times; 10<sup>-scale</sup>)</code>.
      */
     public static BigDecimal valueOf(long unscaledVal, int scale) {
         if (scale == 0)
@@ -1476,8 +1476,8 @@
     }
 
     /**
-     * Returns a {@code BigDecimal} whose value is <tt>(this &times;
-     * multiplicand)</tt>, and whose scale is {@code (this.scale() +
+     * Returns a {@code BigDecimal} whose value is <code>(this &times;
+     * multiplicand)</code>, and whose scale is {@code (this.scale() +
      * multiplicand.scale())}.
      *
      * @param  multiplicand value to be multiplied by this {@code BigDecimal}.
@@ -1501,8 +1501,8 @@
     }
 
     /**
-     * Returns a {@code BigDecimal} whose value is <tt>(this &times;
-     * multiplicand)</tt>, with rounding according to the context settings.
+     * Returns a {@code BigDecimal} whose value is <code>(this &times;
+     * multiplicand)</code>, with rounding according to the context settings.
      *
      * @param  multiplicand value to be multiplied by this {@code BigDecimal}.
      * @param  mc the context to use.
@@ -1995,7 +1995,7 @@
 
     /**
      * Returns a {@code BigDecimal} whose value is
-     * <tt>(this<sup>n</sup>)</tt>, The power is computed exactly, to
+     * <code>(this<sup>n</sup>)</code>, The power is computed exactly, to
      * unlimited precision.
      *
      * <p>The parameter {@code n} must be in the range 0 through
@@ -2006,7 +2006,7 @@
      * range of this method.
      *
      * @param  n power to raise this {@code BigDecimal} to.
-     * @return <tt>this<sup>n</sup></tt>
+     * @return <code>this<sup>n</sup></code>
      * @throws ArithmeticException if {@code n} is out of range.
      * @since  1.5
      */
@@ -2022,7 +2022,7 @@
 
     /**
      * Returns a {@code BigDecimal} whose value is
-     * <tt>(this<sup>n</sup>)</tt>.  The current implementation uses
+     * <code>(this<sup>n</sup>)</code>.  The current implementation uses
      * the core algorithm defined in ANSI standard X3.274-1996 with
      * rounding according to the context settings.  In general, the
      * returned numerical value is within two ulps of the exact
@@ -2063,7 +2063,7 @@
      *
      * @param  n power to raise this {@code BigDecimal} to.
      * @param  mc the context to use.
-     * @return <tt>this<sup>n</sup></tt> using the ANSI standard X3.274-1996
+     * @return <code>this<sup>n</sup></code> using the ANSI standard X3.274-1996
      *         algorithm
      * @throws ArithmeticException if the result is inexact but the
      *         rounding mode is {@code UNNECESSARY}, or {@code n} is out
@@ -2251,8 +2251,8 @@
 
     /**
      * Returns a {@code BigInteger} whose value is the <i>unscaled
-     * value</i> of this {@code BigDecimal}.  (Computes <tt>(this *
-     * 10<sup>this.scale()</sup>)</tt>.)
+     * value</i> of this {@code BigDecimal}.  (Computes <code>(this *
+     * 10<sup>this.scale()</sup>)</code>.)
      *
      * @return the unscaled value of this {@code BigDecimal}.
      * @since  1.2
@@ -2371,7 +2371,7 @@
      * <p>Note that since BigDecimal objects are immutable, calls of
      * this method do <i>not</i> result in the original object being
      * modified, contrary to the usual convention of having methods
-     * named <tt>set<i>X</i></tt> mutate field <i>{@code X}</i>.
+     * named <code>set<i>X</i></code> mutate field <i>{@code X}</i>.
      * Instead, {@code setScale} returns an object with the proper
      * scale; the returned object may or may not be newly allocated.
      *
@@ -2404,7 +2404,7 @@
      * <p>Note that since BigDecimal objects are immutable, calls of
      * this method do <i>not</i> result in the original object being
      * modified, contrary to the usual convention of having methods
-     * named <tt>set<i>X</i></tt> mutate field <i>{@code X}</i>.
+     * named <code>set<i>X</i></code> mutate field <i>{@code X}</i>.
      * Instead, {@code setScale} returns an object with the proper
      * scale; the returned object may or may not be newly allocated.
      *
@@ -2498,7 +2498,7 @@
      * <p>Note that since {@code BigDecimal} objects are immutable,
      * calls of this method do <i>not</i> result in the original
      * object being modified, contrary to the usual convention of
-     * having methods named <tt>set<i>X</i></tt> mutate field
+     * having methods named <code>set<i>X</i></code> mutate field
      * <i>{@code X}</i>.  Instead, {@code setScale} returns an
      * object with the proper scale; the returned object may or may
      * not be newly allocated.
@@ -2525,8 +2525,8 @@
      * {@code n} is non-negative, the call merely adds {@code n} to
      * the scale.  If {@code n} is negative, the call is equivalent
      * to {@code movePointRight(-n)}.  The {@code BigDecimal}
-     * returned by this call has value <tt>(this &times;
-     * 10<sup>-n</sup>)</tt> and scale {@code max(this.scale()+n,
+     * returned by this call has value <code>(this &times;
+     * 10<sup>-n</sup>)</code> and scale {@code max(this.scale()+n,
      * 0)}.
      *
      * @param  n number of places to move the decimal point to the left.
@@ -2547,8 +2547,8 @@
      * If {@code n} is non-negative, the call merely subtracts
      * {@code n} from the scale.  If {@code n} is negative, the call
      * is equivalent to {@code movePointLeft(-n)}.  The
-     * {@code BigDecimal} returned by this call has value <tt>(this
-     * &times; 10<sup>n</sup>)</tt> and scale {@code max(this.scale()-n,
+     * {@code BigDecimal} returned by this call has value <code>(this
+     * &times; 10<sup>n</sup>)</code> and scale {@code max(this.scale()-n,
      * 0)}.
      *
      * @param  n number of places to move the decimal point to the right.
@@ -2825,12 +2825,12 @@
      * adjusted exponent converted to a character form.  The latter is
      * in base ten, using the characters {@code '0'} through
      * {@code '9'} with no leading zeros, and is always prefixed by a
-     * sign character {@code '-'} (<tt>'&#92;u002D'</tt>) if the
+     * sign character {@code '-'} (<code>'&#92;u002D'</code>) if the
      * adjusted exponent is negative, {@code '+'}
-     * (<tt>'&#92;u002B'</tt>) otherwise).
+     * (<code>'&#92;u002B'</code>) otherwise).
      *
      * <p>Finally, the entire string is prefixed by a minus sign
-     * character {@code '-'} (<tt>'&#92;u002D'</tt>) if the unscaled
+     * character {@code '-'} (<code>'&#92;u002D'</code>) if the unscaled
      * value is less than zero.  No sign character is prefixed if the
      * unscaled value is zero or positive.
      *
@@ -2930,7 +2930,7 @@
      * in the result.
      *
      * The entire string is prefixed by a minus sign character '-'
-     * (<tt>'&#92;u002D'</tt>) if the unscaled value is less than
+     * (<code>'&#92;u002D'</code>) if the unscaled value is less than
      * zero. No sign character is prefixed if the unscaled value is
      * zero or positive.
      *
--- a/jdk/src/java.base/share/classes/java/math/BigInteger.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/math/BigInteger.java	Mon Aug 10 14:05:37 2015 +0300
@@ -2289,11 +2289,11 @@
     }
 
     /**
-     * Returns a BigInteger whose value is <tt>(this<sup>exponent</sup>)</tt>.
+     * Returns a BigInteger whose value is <code>(this<sup>exponent</sup>)</code>.
      * Note that {@code exponent} is an integer rather than a BigInteger.
      *
      * @param  exponent exponent to which this BigInteger is to be raised.
-     * @return <tt>this<sup>exponent</sup></tt>
+     * @return <code>this<sup>exponent</sup></code>
      * @throws ArithmeticException {@code exponent} is negative.  (This would
      *         cause the operation to yield a non-integer value.)
      */
@@ -2552,12 +2552,12 @@
 
     /**
      * Returns a BigInteger whose value is
-     * <tt>(this<sup>exponent</sup> mod m)</tt>.  (Unlike {@code pow}, this
+     * <code>(this<sup>exponent</sup> mod m)</code>.  (Unlike {@code pow}, this
      * method permits negative exponents.)
      *
      * @param  exponent the exponent.
      * @param  m the modulus.
-     * @return <tt>this<sup>exponent</sup> mod m</tt>
+     * @return <code>this<sup>exponent</sup> mod m</code>
      * @throws ArithmeticException {@code m} &le; 0 or the exponent is
      *         negative and this BigInteger is not <i>relatively
      *         prime</i> to {@code m}.
@@ -3152,7 +3152,7 @@
      * Returns a BigInteger whose value is {@code (this << n)}.
      * The shift distance, {@code n}, may be negative, in which case
      * this method performs a right shift.
-     * (Computes <tt>floor(this * 2<sup>n</sup>)</tt>.)
+     * (Computes <code>floor(this * 2<sup>n</sup>)</code>.)
      *
      * @param  n shift distance, in bits.
      * @return {@code this << n}
@@ -3175,7 +3175,7 @@
     /**
      * Returns a magnitude array whose value is {@code (mag << n)}.
      * The shift distance, {@code n}, is considered unnsigned.
-     * (Computes <tt>this * 2<sup>n</sup></tt>.)
+     * (Computes <code>this * 2<sup>n</sup></code>.)
      *
      * @param mag magnitude, the most-significant int ({@code mag[0]}) must be non-zero.
      * @param  n unsigned shift distance, in bits.
@@ -3212,7 +3212,7 @@
      * Returns a BigInteger whose value is {@code (this >> n)}.  Sign
      * extension is performed.  The shift distance, {@code n}, may be
      * negative, in which case this method performs a left shift.
-     * (Computes <tt>floor(this / 2<sup>n</sup>)</tt>.)
+     * (Computes <code>floor(this / 2<sup>n</sup>)</code>.)
      *
      * @param  n shift distance, in bits.
      * @return {@code this >> n}
@@ -3235,7 +3235,7 @@
     /**
      * Returns a BigInteger whose value is {@code (this >> n)}. The shift
      * distance, {@code n}, is considered unsigned.
-     * (Computes <tt>floor(this * 2<sup>-n</sup>)</tt>.)
+     * (Computes <code>floor(this * 2<sup>-n</sup>)</code>.)
      *
      * @param  n unsigned shift distance, in bits.
      * @return {@code this >> n}
--- a/jdk/src/java.base/share/classes/java/math/MathContext.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/math/MathContext.java	Mon Aug 10 14:05:37 2015 +0300
@@ -268,7 +268,7 @@
      * Returns the string representation of this {@code MathContext}.
      * The {@code String} returned represents the settings of the
      * {@code MathContext} object as two space-delimited words
-     * (separated by a single space character, <tt>'&#92;u0020'</tt>,
+     * (separated by a single space character, <code>'&#92;u0020'</code>,
      * and with no leading or trailing white space), as follows:
      * <ol>
      * <li>
--- a/jdk/src/java.base/share/classes/java/math/MutableBigInteger.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/math/MutableBigInteger.java	Mon Aug 10 14:05:37 2015 +0300
@@ -254,7 +254,7 @@
     /**
      * Compare the magnitude of two MutableBigIntegers. Returns -1, 0 or 1
      * as this MutableBigInteger is numerically less than, equal to, or
-     * greater than <tt>b</tt>.
+     * greater than {@code b}.
      */
     final int compare(MutableBigInteger b) {
         int blen = b.intLen;
--- a/jdk/src/java.base/share/classes/java/time/Instant.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/time/Instant.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1232,10 +1232,10 @@
         if (seconds < 0 && nanos > 0) {
             long millis = Math.multiplyExact(seconds+1, 1000);
             long adjustment = nanos / 1000_000 - 1000;
-            return millis + adjustment;
+            return Math.addExact(millis, adjustment);
         } else {
             long millis = Math.multiplyExact(seconds, 1000);
-            return millis + nanos / 1000_000;
+            return Math.addExact(millis, nanos / 1000_000);
         }
     }
 
--- a/jdk/src/java.base/share/classes/java/util/jar/Attributes.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/jar/Attributes.java	Mon Aug 10 14:05:37 2015 +0300
@@ -526,7 +526,7 @@
         }
 
         /**
-         * <code>Name</code> object for <code>Manifest-Version</code>
+         * {@code Name} object for {@code Manifest-Version}
          * manifest attribute. This attribute indicates the version number
          * of the manifest standard to which a JAR file's manifest conforms.
          * @see <a href="../../../../technotes/guides/jar/jar.html#JAR_Manifest">
@@ -535,7 +535,7 @@
         public static final Name MANIFEST_VERSION = new Name("Manifest-Version");
 
         /**
-         * <code>Name</code> object for <code>Signature-Version</code>
+         * {@code Name} object for {@code Signature-Version}
          * manifest attribute used when signing JAR files.
          * @see <a href="../../../../technotes/guides/jar/jar.html#JAR_Manifest">
          *      Manifest and Signature Specification</a>
@@ -543,13 +543,13 @@
         public static final Name SIGNATURE_VERSION = new Name("Signature-Version");
 
         /**
-         * <code>Name</code> object for <code>Content-Type</code>
+         * {@code Name} object for {@code Content-Type}
          * manifest attribute.
          */
         public static final Name CONTENT_TYPE = new Name("Content-Type");
 
         /**
-         * <code>Name</code> object for <code>Class-Path</code>
+         * {@code Name} object for {@code Class-Path}
          * manifest attribute.
          * @see <a href="../../../../technotes/guides/jar/jar.html#classpath">
          *      JAR file specification</a>
@@ -557,16 +557,16 @@
         public static final Name CLASS_PATH = new Name("Class-Path");
 
         /**
-         * <code>Name</code> object for <code>Main-Class</code> manifest
+         * {@code Name} object for {@code Main-Class} manifest
          * attribute used for launching applications packaged in JAR files.
-         * The <code>Main-Class</code> attribute is used in conjunction
-         * with the <code>-jar</code> command-line option of the
-         * <tt>java</tt> application launcher.
+         * The {@code Main-Class} attribute is used in conjunction
+         * with the {@code -jar} command-line option of the
+         * {@code java} application launcher.
          */
         public static final Name MAIN_CLASS = new Name("Main-Class");
 
         /**
-         * <code>Name</code> object for <code>Sealed</code> manifest attribute
+         * {@code Name} object for {@code Sealed} manifest attribute
          * used for sealing.
          * @see <a href="../../../../technotes/guides/jar/jar.html#sealing">
          *      Package Sealing</a>
@@ -574,19 +574,19 @@
         public static final Name SEALED = new Name("Sealed");
 
        /**
-         * <code>Name</code> object for <code>Extension-List</code> manifest attribute
+         * {@code Name} object for {@code Extension-List} manifest attribute
          * used for the extension mechanism that is no longer supported.
          */
         public static final Name EXTENSION_LIST = new Name("Extension-List");
 
         /**
-         * <code>Name</code> object for <code>Extension-Name</code> manifest attribute.
+         * {@code Name} object for {@code Extension-Name} manifest attribute.
          * used for the extension mechanism that is no longer supported.
          */
         public static final Name EXTENSION_NAME = new Name("Extension-Name");
 
         /**
-         * <code>Name</code> object for <code>Extension-Installation</code> manifest attribute.
+         * {@code Name} object for {@code Extension-Installation} manifest attribute.
          *
          * @deprecated Extension mechanism is no longer supported.
          */
@@ -594,25 +594,25 @@
         public static final Name EXTENSION_INSTALLATION = new Name("Extension-Installation");
 
         /**
-         * <code>Name</code> object for <code>Implementation-Title</code>
+         * {@code Name} object for {@code Implementation-Title}
          * manifest attribute used for package versioning.
          */
         public static final Name IMPLEMENTATION_TITLE = new Name("Implementation-Title");
 
         /**
-         * <code>Name</code> object for <code>Implementation-Version</code>
+         * {@code Name} object for {@code Implementation-Version}
          * manifest attribute used for package versioning.
          */
         public static final Name IMPLEMENTATION_VERSION = new Name("Implementation-Version");
 
         /**
-         * <code>Name</code> object for <code>Implementation-Vendor</code>
+         * {@code Name} object for {@code Implementation-Vendor}
          * manifest attribute used for package versioning.
          */
         public static final Name IMPLEMENTATION_VENDOR = new Name("Implementation-Vendor");
 
         /**
-         * <code>Name</code> object for <code>Implementation-Vendor-Id</code>
+         * {@code Name} object for {@code Implementation-Vendor-Id}
          * manifest attribute.
          *
          * @deprecated Extension mechanism is no longer supported.
@@ -621,7 +621,7 @@
         public static final Name IMPLEMENTATION_VENDOR_ID = new Name("Implementation-Vendor-Id");
 
        /**
-         * <code>Name</code> object for <code>Implementation-URL</code>
+         * {@code Name} object for {@code Implementation-URL}
          * manifest attribute.
          *
          * @deprecated Extension mechanism is no longer supported.
@@ -630,19 +630,19 @@
         public static final Name IMPLEMENTATION_URL = new Name("Implementation-URL");
 
         /**
-         * <code>Name</code> object for <code>Specification-Title</code>
+         * {@code Name} object for {@code Specification-Title}
          * manifest attribute used for package versioning.
          */
         public static final Name SPECIFICATION_TITLE = new Name("Specification-Title");
 
         /**
-         * <code>Name</code> object for <code>Specification-Version</code>
+         * {@code Name} object for {@code Specification-Version}
          * manifest attribute used for package versioning.
          */
         public static final Name SPECIFICATION_VERSION = new Name("Specification-Version");
 
         /**
-         * <code>Name</code> object for <code>Specification-Vendor</code>
+         * {@code Name} object for {@code Specification-Vendor}
          * manifest attribute used for package versioning.
          */
         public static final Name SPECIFICATION_VENDOR = new Name("Specification-Vendor");
--- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java	Mon Aug 10 14:05:37 2015 +0300
@@ -43,14 +43,14 @@
 import sun.security.util.SignatureFileVerifier;
 
 /**
- * The <code>JarFile</code> class is used to read the contents of a jar file
- * from any file that can be opened with <code>java.io.RandomAccessFile</code>.
- * It extends the class <code>java.util.zip.ZipFile</code> with support
- * for reading an optional <code>Manifest</code> entry. The
- * <code>Manifest</code> can be used to specify meta-information about the
+ * The {@code JarFile} class is used to read the contents of a jar file
+ * from any file that can be opened with {@code java.io.RandomAccessFile}.
+ * It extends the class {@code java.util.zip.ZipFile} with support
+ * for reading an optional {@code Manifest} entry. The
+ * {@code Manifest} can be used to specify meta-information about the
  * jar file and its entries.
  *
- * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor
+ * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
  * or method in this class will cause a {@link NullPointerException} to be
  * thrown.
  *
@@ -91,8 +91,8 @@
     public static final String MANIFEST_NAME = "META-INF/MANIFEST.MF";
 
     /**
-     * Creates a new <code>JarFile</code> to read from the specified
-     * file <code>name</code>. The <code>JarFile</code> will be verified if
+     * Creates a new {@code JarFile} to read from the specified
+     * file {@code name}. The {@code JarFile} will be verified if
      * it is signed.
      * @param name the name of the jar file to be opened for reading
      * @throws IOException if an I/O error has occurred
@@ -104,8 +104,8 @@
     }
 
     /**
-     * Creates a new <code>JarFile</code> to read from the specified
-     * file <code>name</code>.
+     * Creates a new {@code JarFile} to read from the specified
+     * file {@code name}.
      * @param name the name of the jar file to be opened for reading
      * @param verify whether or not to verify the jar file if
      * it is signed.
@@ -118,8 +118,8 @@
     }
 
     /**
-     * Creates a new <code>JarFile</code> to read from the specified
-     * <code>File</code> object. The <code>JarFile</code> will be verified if
+     * Creates a new {@code JarFile} to read from the specified
+     * {@code File} object. The {@code JarFile} will be verified if
      * it is signed.
      * @param file the jar file to be opened for reading
      * @throws IOException if an I/O error has occurred
@@ -132,8 +132,8 @@
 
 
     /**
-     * Creates a new <code>JarFile</code> to read from the specified
-     * <code>File</code> object.
+     * Creates a new {@code JarFile} to read from the specified
+     * {@code File} object.
      * @param file the jar file to be opened for reading
      * @param verify whether or not to verify the jar file if
      * it is signed.
@@ -147,9 +147,9 @@
 
 
     /**
-     * Creates a new <code>JarFile</code> to read from the specified
-     * <code>File</code> object in the specified mode.  The mode argument
-     * must be either <tt>OPEN_READ</tt> or <tt>OPEN_READ | OPEN_DELETE</tt>.
+     * Creates a new {@code JarFile} to read from the specified
+     * {@code File} object in the specified mode.  The mode argument
+     * must be either {@code OPEN_READ} or {@code OPEN_READ | OPEN_DELETE}.
      *
      * @param file the jar file to be opened for reading
      * @param verify whether or not to verify the jar file if
@@ -157,7 +157,7 @@
      * @param mode the mode in which the file is to be opened
      * @throws IOException if an I/O error has occurred
      * @throws IllegalArgumentException
-     *         if the <tt>mode</tt> argument is invalid
+     *         if the {@code mode} argument is invalid
      * @throws SecurityException if access to the file is denied
      *         by the SecurityManager
      * @since 1.3
@@ -168,9 +168,9 @@
     }
 
     /**
-     * Returns the jar file manifest, or <code>null</code> if none.
+     * Returns the jar file manifest, or {@code null} if none.
      *
-     * @return the jar file manifest, or <code>null</code> if none
+     * @return the jar file manifest, or {@code null} if none
      *
      * @throws IllegalStateException
      *         may be thrown if the jar file has been closed
@@ -207,12 +207,12 @@
     private native String[] getMetaInfEntryNames();
 
     /**
-     * Returns the <code>JarEntry</code> for the given entry name or
-     * <code>null</code> if not found.
+     * Returns the {@code JarEntry} for the given entry name or
+     * {@code null} if not found.
      *
      * @param name the jar file entry name
-     * @return the <code>JarEntry</code> for the given entry name or
-     *         <code>null</code> if not found.
+     * @return the {@code JarEntry} for the given entry name or
+     *         {@code null} if not found.
      *
      * @throws IllegalStateException
      *         may be thrown if the jar file has been closed
@@ -224,12 +224,12 @@
     }
 
     /**
-     * Returns the <code>ZipEntry</code> for the given entry name or
-     * <code>null</code> if not found.
+     * Returns the {@code ZipEntry} for the given entry name or
+     * {@code null} if not found.
      *
      * @param name the jar file entry name
-     * @return the <code>ZipEntry</code> for the given entry name or
-     *         <code>null</code> if not found
+     * @return the {@code ZipEntry} for the given entry name or
+     *         {@code null} if not found
      *
      * @throws IllegalStateException
      *         may be thrown if the jar file has been closed
--- a/jdk/src/java.base/share/classes/java/util/jar/Pack200.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/jar/Pack200.java	Mon Aug 10 14:05:37 2015 +0300
@@ -95,7 +95,7 @@
  * the file encoded with Pack200 and further compressed with gzip. Please
  * refer to the Java Deployment Guide for techniques and details.
  * <p>
- * Unless otherwise noted, passing a <tt>null</tt> argument to a constructor or
+ * Unless otherwise noted, passing a {@code null} argument to a constructor or
  * method in this class will cause a {@link NullPointerException} to be thrown.
  *
  * @author John Rose
@@ -109,7 +109,7 @@
     /**
      * Obtain new instance of a class that implements Packer.
      * <ul>
-     * <li><p>If the system property <tt>java.util.jar.Pack200.Packer</tt>
+     * <li><p>If the system property {@code java.util.jar.Pack200.Packer}
      * is defined, then the value is taken to be the fully-qualified name
      * of a concrete implementation class, which must implement Packer.
      * This class is loaded and instantiated.  If this process fails
@@ -135,7 +135,7 @@
     /**
      * Obtain new instance of a class that implements Unpacker.
      * <ul>
-     * <li><p>If the system property <tt>java.util.jar.Pack200.Unpacker</tt>
+     * <li><p>If the system property {@code java.util.jar.Pack200.Unpacker}
      * is defined, then the value is taken to be the fully-qualified
      * name of a concrete implementation class, which must implement Unpacker.
      * The class is loaded and instantiated.  If this process fails
@@ -220,7 +220,7 @@
      *    If the input JAR-files contains a 1.6 class file, then the pack file
      * version will be set to 1.6.
      * <p>
-     * Note: Unless otherwise noted, passing a <tt>null</tt> argument to a
+     * Note: Unless otherwise noted, passing a {@code null} argument to a
      * constructor or method in this class will cause a {@link NullPointerException}
      * to be thrown.
      *
@@ -367,7 +367,7 @@
          * {@link #STRIP}, and {@link #PASS}.
          * <p>
          * The string {@link #ERROR} means that the pack operation
-         * as a whole will fail, with an exception of type <code>IOException</code>.
+         * as a whole will fail, with an exception of type {@code IOException}.
          * The string
          * {@link #STRIP} means that the attribute will be dropped.
          * The string
@@ -391,7 +391,7 @@
          * using the layout language specified in the JSR 200 specification.
          * <p>
          * For example, the effect of this option is built in:
-         * <code>pack.class.attribute.SourceFile=RUH</code>.
+         * {@code pack.class.attribute.SourceFile=RUH}.
          * <p>
          * The special strings {@link #ERROR}, {@link #STRIP}, and {@link #PASS} are
          * also allowed, with the same meaning as {@link #UNKNOWN_ATTRIBUTE}.
@@ -399,21 +399,21 @@
          * refused, stripped, or passed bitwise (with no class compression).
          * <p>
          * Code like this might be used to support attributes for JCOV:
-         * <pre><code>
+         * <pre>{@code
          *     Map p = packer.properties();
          *     p.put(CODE_ATTRIBUTE_PFX+"CoverageTable",       "NH[PHHII]");
          *     p.put(CODE_ATTRIBUTE_PFX+"CharacterRangeTable", "NH[PHPOHIIH]");
          *     p.put(CLASS_ATTRIBUTE_PFX+"SourceID",           "RUH");
          *     p.put(CLASS_ATTRIBUTE_PFX+"CompilationID",      "RUH");
-         * </code></pre>
+         * }</pre>
          * <p>
          * Code like this might be used to strip debugging attributes:
-         * <pre><code>
+         * <pre>{@code
          *     Map p = packer.properties();
          *     p.put(CODE_ATTRIBUTE_PFX+"LineNumberTable",    STRIP);
          *     p.put(CODE_ATTRIBUTE_PFX+"LocalVariableTable", STRIP);
          *     p.put(CLASS_ATTRIBUTE_PFX+"SourceFile",        STRIP);
-         * </code></pre>
+         * }</pre>
          */
         String CLASS_ATTRIBUTE_PFX      = "pack.class.attribute.";
 
@@ -421,7 +421,7 @@
          * When concatenated with a field attribute name,
          * indicates the format of that attribute.
          * For example, the effect of this option is built in:
-         * <code>pack.field.attribute.Deprecated=</code>.
+         * {@code pack.field.attribute.Deprecated=}.
          * The special strings {@link #ERROR}, {@link #STRIP}, and
          * {@link #PASS} are also allowed.
          * @see #CLASS_ATTRIBUTE_PFX
@@ -432,7 +432,7 @@
          * When concatenated with a method attribute name,
          * indicates the format of that attribute.
          * For example, the effect of this option is built in:
-         * <code>pack.method.attribute.Exceptions=NH[RCH]</code>.
+         * {@code pack.method.attribute.Exceptions=NH[RCH]}.
          * The special strings {@link #ERROR}, {@link #STRIP}, and {@link #PASS}
          * are also allowed.
          * @see #CLASS_ATTRIBUTE_PFX
@@ -443,7 +443,7 @@
          * When concatenated with a code attribute name,
          * indicates the format of that attribute.
          * For example, the effect of this option is built in:
-         * <code>pack.code.attribute.LocalVariableTable=NH[PHOHRUHRSHH]</code>.
+         * {@code pack.code.attribute.LocalVariableTable=NH[PHOHRUHRSHH]}.
          * The special strings {@link #ERROR}, {@link #STRIP}, and {@link #PASS}
          * are also allowed.
          * @see #CLASS_ATTRIBUTE_PFX
@@ -527,9 +527,9 @@
          * <p>
          * Implementation specific properties are prefixed with a
          * package name associated with the implementor, beginning
-         * with <tt>com.</tt> or a similar prefix.
-         * All property names beginning with <tt>pack.</tt> and
-         * <tt>unpack.</tt> are reserved for use by this API.
+         * with {@code com.} or a similar prefix.
+         * All property names beginning with {@code pack.} and
+         * {@code unpack.} are reserved for use by this API.
          * <p>
          * Unknown properties may be ignored or rejected with an
          * unspecified error, and invalid entries may cause an
@@ -575,10 +575,10 @@
      * using {@link #newUnpacker}.
      * <p>
      * Every JAR file produced by this engine will include the string
-     * "<tt>PACK200</tt>" as a zip file comment.
+     * "{@code PACK200}" as a zip file comment.
      * This allows a deployer to detect if a JAR archive was packed and unpacked.
      * <p>
-     * Note: Unless otherwise noted, passing a <tt>null</tt> argument to a
+     * Note: Unless otherwise noted, passing a {@code null} argument to a
      * constructor or method in this class will cause a {@link NullPointerException}
      * to be thrown.
      * <p>
@@ -641,9 +641,9 @@
          * <p>
          * Implementation specific properties are prefixed with a
          * package name associated with the implementor, beginning
-         * with <tt>com.</tt> or a similar prefix.
-         * All property names beginning with <tt>pack.</tt> and
-         * <tt>unpack.</tt> are reserved for use by this API.
+         * with {@code com.} or a similar prefix.
+         * All property names beginning with {@code pack.} and
+         * {@code unpack.} are reserved for use by this API.
          * <p>
          * Unknown properties may be ignored or rejected with an
          * unspecified error, and invalid entries may cause an
--- a/jdk/src/java.base/share/classes/java/util/regex/Matcher.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/regex/Matcher.java	Mon Aug 10 14:05:37 2015 +0300
@@ -63,7 +63,7 @@
  *
  * <p> A matcher finds matches in a subset of its input called the
  * <i>region</i>. By default, the region contains all of the matcher's input.
- * The region can be modified via the{@link #region region} method and queried
+ * The region can be modified via the {@link #region region} method and queried
  * via the {@link #regionStart regionStart} and {@link #regionEnd regionEnd}
  * methods. The way that the region boundaries interact with some pattern
  * constructs can be changed. See {@link #useAnchoringBounds
@@ -1639,15 +1639,15 @@
      */
     public String toString() {
         StringBuilder sb = new StringBuilder();
-        sb.append("java.util.regex.Matcher");
-        sb.append("[pattern=" + pattern());
-        sb.append(" region=");
-        sb.append(regionStart() + "," + regionEnd());
-        sb.append(" lastmatch=");
+        sb.append("java.util.regex.Matcher")
+                .append("[pattern=").append(pattern())
+                .append(" region=")
+                .append(regionStart()).append(',').append(regionEnd())
+                .append(" lastmatch=");
         if ((first >= 0) && (group() != null)) {
             sb.append(group());
         }
-        sb.append("]");
+        sb.append(']');
         return sb.toString();
     }
 
--- a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java	Mon Aug 10 14:05:37 2015 +0300
@@ -565,7 +565,7 @@
  * <p>
  * <b><a name="usc">Scripts</a></b> are specified either with the prefix {@code Is}, as in
  * {@code IsHiragana}, or by using  the {@code script} keyword (or its short
- * form {@code sc})as in {@code script=Hiragana} or {@code sc=Hiragana}.
+ * form {@code sc}) as in {@code script=Hiragana} or {@code sc=Hiragana}.
  * <p>
  * The script names supported by <code>Pattern</code> are the valid script names
  * accepted and defined by
@@ -1299,18 +1299,22 @@
         if (slashEIndex == -1)
             return "\\Q" + s + "\\E";
 
-        StringBuilder sb = new StringBuilder(s.length() * 2);
+        int lenHint = s.length();
+        lenHint = (lenHint < Integer.MAX_VALUE - 8 - lenHint) ?
+                (lenHint << 1) : (Integer.MAX_VALUE - 8);
+
+        StringBuilder sb = new StringBuilder(lenHint);
         sb.append("\\Q");
-        slashEIndex = 0;
         int current = 0;
-        while ((slashEIndex = s.indexOf("\\E", current)) != -1) {
-            sb.append(s.substring(current, slashEIndex));
+        do {
+            sb.append(s, current, slashEIndex)
+                    .append("\\E\\\\E\\Q");
             current = slashEIndex + 2;
-            sb.append("\\E\\\\E\\Q");
-        }
-        sb.append(s.substring(current, s.length()));
-        sb.append("\\E");
-        return sb.toString();
+        } while ((slashEIndex = s.indexOf("\\E", current)) != -1);
+
+        return sb.append(s, current, s.length())
+                .append("\\E")
+                .toString();
     }
 
     /**
@@ -1367,14 +1371,16 @@
     }
 
     /**
-     * The pattern is converted to normalizedD form and then a pure group
-     * is constructed to match canonical equivalences of the characters.
+     * The pattern is converted to normalized form ({@linkplain
+     * java.text.Normalizer.Form.NFD NFD}, canonical decomposition)
+     * and then a pure group is constructed to match canonical
+     * equivalences of the characters.
      */
     private void normalize() {
         boolean inCharClass = false;
         int lastCodePoint = -1;
 
-        // Convert pattern into normalizedD form
+        // Convert pattern into normalized form
         normalizedPattern = Normalizer.normalize(pattern, Normalizer.Form.NFD);
         patternLength = normalizedPattern.length();
 
--- a/jdk/src/java.base/share/classes/java/util/stream/Stream.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/stream/Stream.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1232,6 +1232,9 @@
      * Accessing an element of a deeply concatenated stream can result in deep
      * call chains, or even {@code StackOverflowError}.
      *
+     * <p>Subsequent changes to the sequential/parallel execution mode of the
+     * returned stream are not guaranteed to be propagated to the input streams.
+     *
      * @param <T> The type of stream elements
      * @param a the first stream
      * @param b the second stream
--- a/jdk/src/java.base/share/classes/java/util/stream/package-info.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/stream/package-info.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -159,7 +159,7 @@
  * is a necessary, but not sufficient, condition for the processing of an infinite
  * stream to terminate normally in finite time.
  *
- * <h3>Parallelism</h3>
+ * <h3><a name="Parallelism">Parallelism</a></h3>
  *
  * <p>Processing elements with an explicit {@code for-}loop is inherently serial.
  * Streams facilitate parallel execution by reframing the computation as a pipeline of
@@ -184,15 +184,15 @@
  *
  * <p>The only difference between the serial and parallel versions of this
  * example is the creation of the initial stream, using "{@code parallelStream()}"
- * instead of "{@code stream()}".  When the terminal operation is initiated,
- * the stream pipeline is executed sequentially or in parallel depending on the
- * orientation of the stream on which it is invoked.  Whether a stream will execute in serial or
- * parallel can be determined with the {@code isParallel()} method, and the
- * orientation of a stream can be modified with the
+ * instead of "{@code stream()}". The stream pipeline is executed sequentially or
+ * in parallel depending on the mode of the stream on which the terminal operation
+ * is invoked. The sequential or parallel mode of a stream can be determined with the
+ * {@link java.util.stream.BaseStream#isParallel()} method, and the
+ * stream's mode can be modified with the
  * {@link java.util.stream.BaseStream#sequential()} and
- * {@link java.util.stream.BaseStream#parallel()} operations.  When the terminal
- * operation is initiated, the stream pipeline is executed sequentially or in
- * parallel depending on the mode of the stream on which it is invoked.
+ * {@link java.util.stream.BaseStream#parallel()} operations.
+ * The most recent sequential or parallel mode setting applies to the
+ * execution of the entire stream pipeline.
  *
  * <p>Except for operations identified as explicitly nondeterministic, such
  * as {@code findAny()}, whether a stream executes sequentially or in parallel
@@ -280,7 +280,7 @@
  * parameters to stream operations entirely; there is usually a way to
  * restructure the stream pipeline to avoid statefulness.
  *
- * <h3>Side-effects</h3>
+ * <h3><a name="SideEffects">Side-effects</a></h3>
  *
  * Side-effects in behavioral parameters to stream operations are, in general,
  * discouraged, as they can often lead to unwitting violations of the
--- a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,8 +34,8 @@
  * package description</a>.
  *
  * <p>The following code fragment demonstrates a trivial compression
- * and decompression of a string using <tt>Deflater</tt> and
- * <tt>Inflater</tt>.
+ * and decompression of a string using {@code Deflater} and
+ * {@code Inflater}.
  *
  * <blockquote><pre>
  * try {
--- a/jdk/src/java.base/share/classes/java/util/zip/Inflater.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/zip/Inflater.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,8 +34,8 @@
  * package description</a>.
  *
  * <p>The following code fragment demonstrates a trivial compression
- * and decompression of a string using <tt>Deflater</tt> and
- * <tt>Inflater</tt>.
+ * and decompression of a string using {@code Deflater} and
+ * {@code Inflater}.
  *
  * <blockquote><pre>
  * try {
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Mon Aug 10 14:05:37 2015 +0300
@@ -50,7 +50,7 @@
 /**
  * This class is used to read entries from a zip file.
  *
- * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor
+ * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
  * or method in this class will cause a {@link NullPointerException} to be
  * thrown.
  *
@@ -76,7 +76,7 @@
      * Mode flag to open a zip file and mark it for deletion.  The file will be
      * deleted some time between the moment that it is opened and the moment
      * that it is closed, but its contents will remain accessible via the
-     * <tt>ZipFile</tt> object until either the close method is invoked or the
+     * {@code ZipFile} object until either the close method is invoked or the
      * virtual machine exits.
      */
     public static final int OPEN_DELETE = 0x4;
@@ -101,8 +101,8 @@
     /**
      * Opens a zip file for reading.
      *
-     * <p>First, if there is a security manager, its <code>checkRead</code>
-     * method is called with the <code>name</code> argument as its argument
+     * <p>First, if there is a security manager, its {@code checkRead}
+     * method is called with the {@code name} argument as its argument
      * to ensure the read is allowed.
      *
      * <p>The UTF-8 {@link java.nio.charset.Charset charset} is used to
@@ -112,7 +112,7 @@
      * @throws ZipException if a ZIP format error has occurred
      * @throws IOException if an I/O error has occurred
      * @throws SecurityException if a security manager exists and its
-     *         <code>checkRead</code> method doesn't allow read access to the file.
+     *         {@code checkRead} method doesn't allow read access to the file.
      *
      * @see SecurityManager#checkRead(java.lang.String)
      */
@@ -121,12 +121,12 @@
     }
 
     /**
-     * Opens a new <code>ZipFile</code> to read from the specified
-     * <code>File</code> object in the specified mode.  The mode argument
-     * must be either <tt>OPEN_READ</tt> or <tt>OPEN_READ | OPEN_DELETE</tt>.
+     * Opens a new {@code ZipFile} to read from the specified
+     * {@code File} object in the specified mode.  The mode argument
+     * must be either {@code OPEN_READ} or {@code OPEN_READ | OPEN_DELETE}.
      *
-     * <p>First, if there is a security manager, its <code>checkRead</code>
-     * method is called with the <code>name</code> argument as its argument to
+     * <p>First, if there is a security manager, its {@code checkRead}
+     * method is called with the {@code name} argument as its argument to
      * ensure the read is allowed.
      *
      * <p>The UTF-8 {@link java.nio.charset.Charset charset} is used to
@@ -137,11 +137,11 @@
      * @throws ZipException if a ZIP format error has occurred
      * @throws IOException if an I/O error has occurred
      * @throws SecurityException if a security manager exists and
-     *         its <code>checkRead</code> method
+     *         its {@code checkRead} method
      *         doesn't allow read access to the file,
-     *         or its <code>checkDelete</code> method doesn't allow deleting
-     *         the file when the <tt>OPEN_DELETE</tt> flag is set.
-     * @throws IllegalArgumentException if the <tt>mode</tt> argument is invalid
+     *         or its {@code checkDelete} method doesn't allow deleting
+     *         the file when the {@code OPEN_DELETE} flag is set.
+     * @throws IllegalArgumentException if the {@code mode} argument is invalid
      * @see SecurityManager#checkRead(java.lang.String)
      * @since 1.3
      */
@@ -166,12 +166,12 @@
     private ZipCoder zc;
 
     /**
-     * Opens a new <code>ZipFile</code> to read from the specified
-     * <code>File</code> object in the specified mode.  The mode argument
-     * must be either <tt>OPEN_READ</tt> or <tt>OPEN_READ | OPEN_DELETE</tt>.
+     * Opens a new {@code ZipFile} to read from the specified
+     * {@code File} object in the specified mode.  The mode argument
+     * must be either {@code OPEN_READ} or {@code OPEN_READ | OPEN_DELETE}.
      *
-     * <p>First, if there is a security manager, its <code>checkRead</code>
-     * method is called with the <code>name</code> argument as its argument to
+     * <p>First, if there is a security manager, its {@code checkRead}
+     * method is called with the {@code name} argument as its argument to
      * ensure the read is allowed.
      *
      * @param file the ZIP file to be opened for reading
@@ -186,12 +186,12 @@
      * @throws IOException if an I/O error has occurred
      *
      * @throws SecurityException
-     *         if a security manager exists and its <code>checkRead</code>
+     *         if a security manager exists and its {@code checkRead}
      *         method doesn't allow read access to the file,or its
-     *         <code>checkDelete</code> method doesn't allow deleting the
-     *         file when the <tt>OPEN_DELETE</tt> flag is set
+     *         {@code checkDelete} method doesn't allow deleting the
+     *         file when the {@code OPEN_DELETE} flag is set
      *
-     * @throws IllegalArgumentException if the <tt>mode</tt> argument is invalid
+     * @throws IllegalArgumentException if the {@code mode} argument is invalid
      *
      * @see SecurityManager#checkRead(java.lang.String)
      *
@@ -227,8 +227,8 @@
     /**
      * Opens a zip file for reading.
      *
-     * <p>First, if there is a security manager, its <code>checkRead</code>
-     * method is called with the <code>name</code> argument as its argument
+     * <p>First, if there is a security manager, its {@code checkRead}
+     * method is called with the {@code name} argument as its argument
      * to ensure the read is allowed.
      *
      * @param name the name of the zip file
@@ -241,7 +241,7 @@
      * @throws ZipException if a ZIP format error has occurred
      * @throws IOException if an I/O error has occurred
      * @throws SecurityException
-     *         if a security manager exists and its <code>checkRead</code>
+     *         if a security manager exists and its {@code checkRead}
      *         method doesn't allow read access to the file
      *
      * @see SecurityManager#checkRead(java.lang.String)
@@ -654,8 +654,8 @@
      *
      * <p>
      * Since the time when GC would invoke this method is undetermined,
-     * it is strongly recommended that applications invoke the <code>close</code>
-     * method as soon they have finished accessing this <code>ZipFile</code>.
+     * it is strongly recommended that applications invoke the {@code close}
+     * method as soon they have finished accessing this {@code ZipFile}.
      * This will prevent holding up system resources for an undetermined
      * length of time.
      *
--- a/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java	Mon Aug 10 14:05:37 2015 +0300
@@ -115,4 +115,45 @@
     public List<SNIServerName> getRequestedServerNames() {
         throw new UnsupportedOperationException();
     }
+
+    /**
+     * Returns a {@link List} containing DER-encoded OCSP responses
+     * (using the ASN.1 type OCSPResponse defined in RFC 6960) for
+     * the client to verify status of the server's certificate during
+     * handshaking.
+     *
+     * <P>
+     * This method only applies to certificate-based server
+     * authentication.  An {@link X509ExtendedTrustManager} will use the
+     * returned value for server certificate validation.
+     *
+     * @implSpec This method throws UnsupportedOperationException by default.
+     *         Classes derived from ExtendedSSLSession must implement
+     *         this method.
+     *
+     * @return a non-null unmodifiable list of byte arrays, each entry
+     *         containing a DER-encoded OCSP response (using the
+     *         ASN.1 type OCSPResponse defined in RFC 6960).  The order
+     *         of the responses must match the order of the certificates
+     *         presented by the server in its Certificate message (See
+     *         {@link SSLSession#getLocalCertificates()} for server mode,
+     *         and {@link SSLSession#getPeerCertificates()} for client mode).
+     *         It is possible that fewer response entries may be returned than
+     *         the number of presented certificates.  If an entry in the list
+     *         is a zero-length byte array, it should be treated by the
+     *         caller as if the OCSP entry for the corresponding certificate
+     *         is missing.  The returned list may be empty if no OCSP responses
+     *         were presented during handshaking or if OCSP stapling is not
+     *         supported by either endpoint for this handshake.
+     *
+     * @throws UnsupportedOperationException if the underlying provider
+     *         does not implement the operation
+     *
+     * @see X509ExtendedTrustManager
+     *
+     * @since 9
+     */
+    public List<byte[]> getStatusResponses() {
+        throw new UnsupportedOperationException();
+    }
 }
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java	Mon Aug 10 14:05:37 2015 +0300
@@ -42,14 +42,13 @@
 import java.util.List;
 import java.util.Map;
 
-import static sun.security.provider.certpath.OCSPResponse.*;
 import sun.security.action.GetIntegerAction;
 import sun.security.util.Debug;
-import sun.security.util.ObjectIdentifier;
 import sun.security.x509.AccessDescription;
 import sun.security.x509.AuthorityInfoAccessExtension;
 import sun.security.x509.GeneralName;
 import sun.security.x509.GeneralNameInterface;
+import sun.security.x509.PKIXExtensions;
 import sun.security.x509.URIName;
 import sun.security.x509.X509CertImpl;
 
@@ -65,9 +64,6 @@
  */
 public final class OCSP {
 
-    static final ObjectIdentifier NONCE_EXTENSION_OID =
-        ObjectIdentifier.newInternal(new int[]{ 1, 3, 6, 1, 5, 5, 7, 48, 1, 2});
-
     private static final Debug debug = Debug.getInstance("certpath");
 
     private static final int DEFAULT_CONNECT_TIMEOUT = 15000;
@@ -184,12 +180,15 @@
     /**
      * Checks the revocation status of a list of certificates using OCSP.
      *
-     * @param certs the CertIds to be checked
+     * @param certIds the CertIds to be checked
      * @param responderURI the URI of the OCSP responder
      * @param issuerCert the issuer's certificate
      * @param responderCert the OCSP responder's certificate
      * @param date the time the validity of the OCSP responder's certificate
      *    should be checked against. If null, the current time is used.
+     * @param extensions zero or more OCSP extensions to be included in the
+     *    request.  If no extensions are requested, an empty {@code List} must
+     *    be used.  A {@code null} value is not allowed.
      * @return the OCSPResponse
      * @throws IOException if there is an exception connecting to or
      *    communicating with the OCSP responder
@@ -202,19 +201,54 @@
                               List<Extension> extensions)
         throws IOException, CertPathValidatorException
     {
-        byte[] bytes = null;
-        OCSPRequest request = null;
+        byte[] nonce = null;
+        for (Extension ext : extensions) {
+            if (ext.getId().equals(PKIXExtensions.OCSPNonce_Id.toString())) {
+                nonce = ext.getValue();
+            }
+        }
+
+        OCSPResponse ocspResponse = null;
         try {
-            request = new OCSPRequest(certIds, extensions);
-            bytes = request.encodeBytes();
+            byte[] response = getOCSPBytes(certIds, responderURI, extensions);
+            ocspResponse = new OCSPResponse(response);
+
+            // verify the response
+            ocspResponse.verify(certIds, issuerCert, responderCert, date,
+                    nonce);
         } catch (IOException ioe) {
-            throw new CertPathValidatorException
-                ("Exception while encoding OCSPRequest", ioe);
+            throw new CertPathValidatorException(
+                "Unable to determine revocation status due to network error",
+                ioe, null, -1, BasicReason.UNDETERMINED_REVOCATION_STATUS);
         }
 
+        return ocspResponse;
+    }
+
+
+    /**
+     * Send an OCSP request, then read and return the OCSP response bytes.
+     *
+     * @param certIds the CertIds to be checked
+     * @param responderURI the URI of the OCSP responder
+     * @param extensions zero or more OCSP extensions to be included in the
+     *    request.  If no extensions are requested, an empty {@code List} must
+     *    be used.  A {@code null} value is not allowed.
+     *
+     * @return the OCSP response bytes
+     *
+     * @throws IOException if there is an exception connecting to or
+     *    communicating with the OCSP responder
+     */
+    public static byte[] getOCSPBytes(List<CertId> certIds, URI responderURI,
+            List<Extension> extensions) throws IOException {
+        OCSPRequest request = new OCSPRequest(certIds, extensions);
+        byte[] bytes = request.encodeBytes();
+
         InputStream in = null;
         OutputStream out = null;
         byte[] response = null;
+
         try {
             URL url = responderURI.toURL();
             if (debug != null) {
@@ -257,10 +291,6 @@
                 }
             }
             response = Arrays.copyOf(response, total);
-        } catch (IOException ioe) {
-            throw new CertPathValidatorException(
-                "Unable to determine revocation status due to network error",
-                ioe, null, -1, BasicReason.UNDETERMINED_REVOCATION_STATUS);
         } finally {
             if (in != null) {
                 try {
@@ -277,20 +307,7 @@
                 }
             }
         }
-
-        OCSPResponse ocspResponse = null;
-        try {
-            ocspResponse = new OCSPResponse(response);
-        } catch (IOException ioe) {
-            // response decoding exception
-            throw new CertPathValidatorException(ioe);
-        }
-
-        // verify the response
-        ocspResponse.verify(certIds, issuerCert, responderCert, date,
-            request.getNonce());
-
-        return ocspResponse;
+        return response;
     }
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPNonceExtension.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,294 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.provider.certpath;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Enumeration;
+import java.security.SecureRandom;
+
+import sun.security.x509.AttributeNameEnumeration;
+import sun.security.x509.CertAttrSet;
+import sun.security.x509.Extension;
+import sun.security.x509.PKIXExtensions;
+import sun.security.util.*;
+
+/**
+ * Represent the OCSP Nonce Extension.
+ * This extension, if present, provides a nonce value in OCSP requests
+ * and responses.  This will cryptographically bind requests and responses
+ * and help to prevent replay attacks (see RFC 6960, section 4.4.1).
+ *
+ * @see Extension
+ * @see CertAttrSet
+ */
+public class OCSPNonceExtension extends Extension
+implements CertAttrSet<String> {
+
+    /**
+     * Attribute name.
+     */
+    public static final String NAME = "OCSPNonce";
+    public static final String NONCE = "nonce";
+
+    private byte[] nonceData = null;
+    private String extensionName;
+
+    /**
+     * Encode this extension value to DER and assign it to the
+     * {@code extensionName} data member.
+     *
+     * @throws IOException if any errors occur during DER encoding
+     */
+    private void encodeInternal() throws IOException {
+        if (nonceData == null) {
+            this.extensionValue = null;
+            return;
+        }
+        DerOutputStream os = new DerOutputStream();
+        os.putOctetString(this.nonceData);
+        this.extensionValue = os.toByteArray();
+    }
+
+    /**
+     * Create a {@code OCSPNonceExtension} by providing the nonce length.
+     * The criticality is set to false.  The random bytes will be generated
+     * using the SUN provider.
+     *
+     * @param length the number of random bytes composing the nonce
+     *
+     * @throws IOException if any errors happen during encoding of the
+     *      extension.
+     */
+    public OCSPNonceExtension(int length) throws IOException {
+        this(PKIXExtensions.OCSPNonce_Id, false, length, NAME);
+    }
+
+    /**
+     * Creates the extension (also called by the subclass).
+     *
+     * @param extensionId the {@code ObjectIdentifier} for the OCSP Nonce
+     *      extension
+     * @param isCritical a boolean flag indicating if the criticality bit
+     *      is to be set for this extension
+     * @param length the length of the nonce in bytes
+     * @param extensionName the name of the extension
+     *
+     * @throws IOException if any errors happen during encoding of the
+     *      extension.
+     */
+    protected OCSPNonceExtension(ObjectIdentifier extensionId,
+            boolean isCritical, int length, String extensionName)
+            throws IOException {
+        SecureRandom rng = new SecureRandom();
+        this.nonceData = new byte[length];
+        rng.nextBytes(nonceData);
+        this.extensionId = extensionId;
+        this.critical = isCritical;
+        this.extensionName = extensionName;
+        encodeInternal();
+    }
+
+    /**
+     * Create the extension using the provided criticality bit setting and
+     * DER encoding.
+     *
+     * @param critical true if the extension is to be treated as critical.
+     * @param value an array of DER encoded bytes of the extnValue for the
+     *      extension.  It must not include the encapsulating OCTET STRING
+     *      tag and length.  For an {@code OCSPNonceExtension} the data value
+     *      should be a simple OCTET STRING containing random bytes
+     *      (see RFC 6960, section 4.4.1).
+     *
+     * @throws ClassCastException if value is not an array of bytes
+     * @throws IOException if any errors happen during encoding of the
+     *      extension
+     */
+    public OCSPNonceExtension(Boolean critical, Object value)
+            throws IOException {
+        this(PKIXExtensions.OCSPNonce_Id, critical, value, NAME);
+    }
+
+    /**
+     * Creates the extension (also called by the subclass).
+     *
+     * @param extensionId the {@code ObjectIdentifier} for the OCSP Nonce
+     *      extension
+     * @param critical a boolean flag indicating if the criticality bit
+     *      is to be set for this extension
+     * @param value an array of DER encoded bytes of the extnValue for the
+     *      extension.  It must not include the encapsulating OCTET STRING
+     *      tag and length.  For an {@code OCSPNonceExtension} the data value
+     *      should be a simple OCTET STRING containing random bytes
+     *      (see RFC 6960, section 4.4.1).
+     * @param extensionName the name of the extension
+     *
+     * @throws ClassCastException if value is not an array of bytes
+     * @throws IOException if any errors happen during encoding of the
+     *      extension
+     */
+    protected OCSPNonceExtension(ObjectIdentifier extensionId,
+            Boolean critical, Object value, String extensionName)
+            throws IOException {
+        this.extensionId = extensionId;
+        this.critical = critical;
+        this.extensionValue = (byte[]) value;
+        DerValue val = new DerValue(this.extensionValue);
+        this.nonceData = val.getOctetString();
+        this.extensionName = extensionName;
+    }
+
+    /**
+     * Set the attribute value.
+     *
+     * @param name the name of the attribute.
+     * @param obj an array of nonce bytes for the extension.  It must not
+     *      contain any DER tags or length.
+     *
+     * @throws IOException if an unsupported name is provided or the supplied
+     *      {@code obj} is not a byte array
+     */
+    @Override
+    public void set(String name, Object obj) throws IOException {
+        if (name.equalsIgnoreCase(NONCE)) {
+            if (!(obj instanceof byte[])) {
+                throw new IOException("Attribute must be of type byte[].");
+            }
+            nonceData = (byte[])obj;
+        } else {
+            throw new IOException("Attribute name not recognized by"
+                    + " CertAttrSet:" + extensionName + ".");
+        }
+        encodeInternal();
+    }
+
+    /**
+     * Get the attribute value.
+     *
+     * @param name the name of the attribute to retrieve.  Only "OCSPNonce"
+     *      is currently supported.
+     *
+     * @return an array of bytes that are the nonce data.  It will not contain
+     *      any DER tags or length, only the random nonce bytes.
+     *
+     * @throws IOException if an unsupported name is provided.
+     */
+    @Override
+    public Object get(String name) throws IOException {
+        if (name.equalsIgnoreCase(NONCE)) {
+            return nonceData;
+        } else {
+            throw new IOException("Attribute name not recognized by"
+                    + " CertAttrSet:" + extensionName + ".");
+        }
+    }
+
+    /**
+     * Delete the attribute value.
+     *
+     * @param name the name of the attribute to retrieve.  Only "OCSPNonce"
+     *      is currently supported.
+     *
+     * @throws IOException if an unsupported name is provided or an error
+     *      occurs during re-encoding of the extension.
+     */
+    @Override
+    public void delete(String name) throws IOException {
+        if (name.equalsIgnoreCase(NONCE)) {
+            nonceData = null;
+        } else {
+            throw new IOException("Attribute name not recognized by"
+                  + " CertAttrSet:" + extensionName + ".");
+        }
+        encodeInternal();
+    }
+
+    /**
+     * Returns a printable representation of the {@code OCSPNonceExtension}.
+     */
+    @Override
+    public String toString() {
+        String s = super.toString() + extensionName + ": " +
+                ((nonceData == null) ? "" : Debug.toString(nonceData))
+                + "\n";
+        return (s);
+    }
+
+    /**
+     * Write the extension to an {@code OutputStream}
+     *
+     * @param out the {@code OutputStream} to write the extension to.
+     *
+     * @throws IOException on encoding errors.
+     */
+    @Override
+    public void encode(OutputStream out) throws IOException {
+        encode(out, PKIXExtensions.OCSPNonce_Id, this.critical);
+    }
+
+    /**
+     * Write the extension to the DerOutputStream.
+     *
+     * @param out the {@code OutputStream} to write the extension to.
+     * @param extensionId the {@code ObjectIdentifier} used for this extension
+     * @param isCritical a flag indicating if the criticality bit is set for
+     *      this extension.
+     *
+     * @throws IOException on encoding errors.
+     */
+    protected void encode(OutputStream out, ObjectIdentifier extensionId,
+            boolean isCritical) throws IOException {
+
+        DerOutputStream tmp = new DerOutputStream();
+
+        if (this.extensionValue == null) {
+            this.extensionId = extensionId;
+            this.critical = isCritical;
+            encodeInternal();
+        }
+        super.encode(tmp);
+        out.write(tmp.toByteArray());
+    }
+
+    /**
+     * Return an enumeration of names of attributes existing within this
+     * attribute.
+     */
+    @Override
+    public Enumeration<String> getElements() {
+        AttributeNameEnumeration elements = new AttributeNameEnumeration();
+        elements.addElement(NONCE);
+        return (elements.elements());
+    }
+
+    /**
+     * Return the name of this attribute.
+     */
+    @Override
+    public String getName() {
+        return (extensionName);
+    }
+}
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPRequest.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPRequest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,10 +32,11 @@
 
 import sun.misc.HexDumpEncoder;
 import sun.security.util.*;
+import sun.security.x509.PKIXExtensions;
 
 /**
  * This class can be used to generate an OCSP request and send it over
- * an outputstream. Currently we do not support signing requests
+ * an output stream. Currently we do not support signing requests.
  * The OCSP Request is specified in RFC 2560 and
  * the ASN.1 definition is as follows:
  * <pre>
@@ -118,7 +119,8 @@
             DerOutputStream extOut = new DerOutputStream();
             for (Extension ext : extensions) {
                 ext.encode(extOut);
-                if (ext.getId().equals(OCSP.NONCE_EXTENSION_OID.toString())) {
+                if (ext.getId().equals(
+                        PKIXExtensions.OCSPNonce_Id.toString())) {
                     nonce = ext.getValue();
                 }
             }
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java	Mon Aug 10 14:05:37 2015 +0300
@@ -41,6 +41,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import javax.security.auth.x500.X500Principal;
 
 import sun.misc.HexDumpEncoder;
@@ -129,7 +130,7 @@
         SIG_REQUIRED,          // Must sign the request
         UNAUTHORIZED           // Request unauthorized
     };
-    private static ResponseStatus[] rsvalues = ResponseStatus.values();
+    private static final ResponseStatus[] rsvalues = ResponseStatus.values();
 
     private static final Debug debug = Debug.getInstance("certpath");
     private static final boolean dump = debug != null && Debug.isOn("ocsp");
@@ -173,7 +174,7 @@
     }
 
     // an array of all of the CRLReasons (used in SingleResponse)
-    private static CRLReason[] values = CRLReason.values();
+    private static final CRLReason[] values = CRLReason.values();
 
     private final ResponseStatus responseStatus;
     private final Map<CertId, SingleResponse> singleResponseMap;
@@ -183,13 +184,16 @@
     private final byte[] responseNonce;
     private List<X509CertImpl> certs;
     private X509CertImpl signerCert = null;
-    private X500Principal responderName = null;
-    private KeyIdentifier responderKeyId = null;
+    private final ResponderId respId;
+    private Date producedAtDate = null;
+    private final Map<String, java.security.cert.Extension> responseExtensions;
 
     /*
      * Create an OCSP response from its ASN.1 DER encoding.
+     *
+     * @param bytes The DER-encoded bytes for an OCSP response
      */
-    OCSPResponse(byte[] bytes) throws IOException {
+    public OCSPResponse(byte[] bytes) throws IOException {
         if (dump) {
             HexDumpEncoder hexEnc = new HexDumpEncoder();
             debug.println("OCSPResponse bytes...\n\n" +
@@ -221,6 +225,8 @@
             signature = null;
             tbsResponseData = null;
             responseNonce = null;
+            responseExtensions = Collections.emptyMap();
+            respId = null;
             return;
         }
 
@@ -239,7 +245,7 @@
         // responseType
         derIn = tmp.data;
         ObjectIdentifier responseType = derIn.getOID();
-        if (responseType.equals(OCSP_BASIC_RESPONSE_OID)) {
+        if (responseType.equals((Object)OCSP_BASIC_RESPONSE_OID)) {
             if (debug != null) {
                 debug.println("OCSP response type: basic");
             }
@@ -289,27 +295,15 @@
         }
 
         // responderID
-        short tag = (byte)(seq.tag & 0x1f);
-        if (tag == NAME_TAG) {
-            responderName = new X500Principal(seq.getData().toByteArray());
-            if (debug != null) {
-                debug.println("Responder's name: " + responderName);
-            }
-        } else if (tag == KEY_TAG) {
-            responderKeyId = new KeyIdentifier(seq.getData().getOctetString());
-            if (debug != null) {
-                debug.println("Responder's key ID: " +
-                    Debug.toString(responderKeyId.getIdentifier()));
-            }
-        } else {
-            throw new IOException("Bad encoding in responderID element of " +
-                "OCSP response: expected ASN.1 context specific tag 0 or 1");
+        respId = new ResponderId(seq.toByteArray());
+        if (debug != null) {
+            debug.println("Responder ID: " + respId);
         }
 
         // producedAt
         seq = seqDerIn.getDerValue();
+        producedAtDate = seq.getGeneralizedTime();
         if (debug != null) {
-            Date producedAtDate = seq.getGeneralizedTime();
             debug.println("OCSP response produced at: " + producedAtDate);
         }
 
@@ -320,36 +314,29 @@
             debug.println("OCSP number of SingleResponses: "
                           + singleResponseDer.length);
         }
-        for (int i = 0; i < singleResponseDer.length; i++) {
-            SingleResponse singleResponse =
-                new SingleResponse(singleResponseDer[i]);
+        for (DerValue srDer : singleResponseDer) {
+            SingleResponse singleResponse = new SingleResponse(srDer);
             singleResponseMap.put(singleResponse.getCertId(), singleResponse);
         }
 
         // responseExtensions
-        byte[] nonce = null;
+        Map<String, java.security.cert.Extension> tmpExtMap = new HashMap<>();
         if (seqDerIn.available() > 0) {
             seq = seqDerIn.getDerValue();
             if (seq.isContextSpecific((byte)1)) {
-                DerValue[] responseExtDer = seq.data.getSequence(3);
-                for (int i = 0; i < responseExtDer.length; i++) {
-                    Extension ext = new Extension(responseExtDer[i]);
-                    if (debug != null) {
-                        debug.println("OCSP extension: " + ext);
-                    }
-                    // Only the NONCE extension is recognized
-                    if (ext.getExtensionId().equals(OCSP.NONCE_EXTENSION_OID))
-                    {
-                        nonce = ext.getExtensionValue();
-                    } else if (ext.isCritical())  {
-                        throw new IOException(
-                            "Unsupported OCSP critical extension: " +
-                            ext.getExtensionId());
-                    }
-                }
+                tmpExtMap = parseExtensions(seq);
             }
         }
-        responseNonce = nonce;
+        responseExtensions = tmpExtMap;
+
+        // Attach the nonce value if found in the extension map
+        Extension nonceExt = (Extension)tmpExtMap.get(
+                PKIXExtensions.OCSPNonce_Id.toString());
+        responseNonce = (nonceExt != null) ?
+                nonceExt.getExtensionValue() : null;
+        if (debug != null && responseNonce != null) {
+            debug.println("Response nonce: " + Arrays.toString(responseNonce));
+        }
 
         // signatureAlgorithmId
         sigAlgId = AlgorithmId.parse(seqTmp[1]);
@@ -436,20 +423,22 @@
                     "Invalid issuer or trusted responder certificate", ce);
             }
 
-            if (responderName != null) {
+            if (respId.getType() == ResponderId.Type.BY_NAME) {
+                X500Principal rName = respId.getResponderName();
                 for (X509CertImpl cert : certs) {
-                    if (cert.getSubjectX500Principal().equals(responderName)) {
+                    if (cert.getSubjectX500Principal().equals(rName)) {
                         signerCert = cert;
                         break;
                     }
                 }
-            } else if (responderKeyId != null) {
+            } else if (respId.getType() == ResponderId.Type.BY_KEY) {
+                KeyIdentifier ridKeyId = respId.getKeyIdentifier();
                 for (X509CertImpl cert : certs) {
                     // Match responder's key identifier against the cert's SKID
                     // This will match if the SKID is encoded using the 160-bit
                     // SHA-1 hash method as defined in RFC 5280.
                     KeyIdentifier certKeyId = cert.getSubjectKeyId();
-                    if (certKeyId != null && responderKeyId.equals(certKeyId)) {
+                    if (certKeyId != null && ridKeyId.equals(certKeyId)) {
                         signerCert = cert;
                         break;
                     } else {
@@ -463,7 +452,7 @@
                         } catch (IOException e) {
                             // ignore
                         }
-                        if (responderKeyId.equals(certKeyId)) {
+                        if (ridKeyId.equals(certKeyId)) {
                             signerCert = cert;
                             break;
                         }
@@ -592,7 +581,6 @@
         }
 
         // Check freshness of OCSPResponse
-
         long now = (date == null) ? System.currentTimeMillis() : date.getTime();
         Date nowPlusSkew = new Date(now + MAX_CLOCK_SKEW);
         Date nowMinusSkew = new Date(now - MAX_CLOCK_SKEW);
@@ -603,16 +591,16 @@
                     until = " until " + sr.nextUpdate;
                 }
                 debug.println("OCSP response validity interval is from " +
-                              sr.thisUpdate + until);
+                        sr.thisUpdate + until);
                 debug.println("Checking validity of OCSP response on: " +
-                    new Date(now));
+                        new Date(now));
             }
 
             // Check that the test date is within the validity interval:
             //   [ thisUpdate - MAX_CLOCK_SKEW,
             //     MAX(thisUpdate, nextUpdate) + MAX_CLOCK_SKEW ]
             if (nowPlusSkew.before(sr.thisUpdate) ||
-                nowMinusSkew.after(
+                    nowMinusSkew.after(
                     sr.nextUpdate != null ? sr.nextUpdate : sr.thisUpdate))
             {
                 throw new CertPathValidatorException(
@@ -624,8 +612,10 @@
 
     /**
      * Returns the OCSP ResponseStatus.
+     *
+     * @return the {@code ResponseStatus} for this OCSP response
      */
-    ResponseStatus getResponseStatus() {
+    public ResponseStatus getResponseStatus() {
         return responseStatus;
     }
 
@@ -663,11 +653,27 @@
     /**
      * Returns the SingleResponse of the specified CertId, or null if
      * there is no response for that CertId.
+     *
+     * @param certId the {@code CertId} for a {@code SingleResponse} to be
+     * searched for in the OCSP response.
+     *
+     * @return the {@code SingleResponse} for the provided {@code CertId},
+     * or {@code null} if it is not found.
      */
-    SingleResponse getSingleResponse(CertId certId) {
+    public SingleResponse getSingleResponse(CertId certId) {
         return singleResponseMap.get(certId);
     }
 
+    /**
+     * Return a set of all CertIds in this {@code OCSPResponse}
+     *
+     * @return an unmodifiable set containing every {@code CertId} in this
+     *      response.
+     */
+    public Set<CertId> getCertIds() {
+        return Collections.unmodifiableSet(singleResponseMap.keySet());
+    }
+
     /*
      * Returns the certificate for the authority that signed the OCSP response.
      */
@@ -676,11 +682,52 @@
     }
 
     /**
+     * Get the {@code ResponderId} from this {@code OCSPResponse}
+     *
+     * @return the {@code ResponderId} from this response or {@code null}
+     *      if no responder ID is in the body of the response (e.g. a
+     *      response with a status other than SUCCESS.
+     */
+    public ResponderId getResponderId() {
+        return respId;
+    }
+
+    /**
+     * Provide a String representation of an OCSPResponse
+     *
+     * @return a human-readable representation of the OCSPResponse
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("OCSP Response:\n");
+        sb.append("Response Status: ").append(responseStatus).append("\n");
+        sb.append("Responder ID: ").append(respId).append("\n");
+        sb.append("Produced at: ").append(producedAtDate).append("\n");
+        int count = singleResponseMap.size();
+        sb.append(count).append(count == 1 ?
+                " response:\n" : " responses:\n");
+        for (SingleResponse sr : singleResponseMap.values()) {
+            sb.append(sr).append("\n");
+        }
+        if (responseExtensions != null && responseExtensions.size() > 0) {
+            count = responseExtensions.size();
+            sb.append(count).append(count == 1 ?
+                    " extension:\n" : " extensions:\n");
+            for (String extId : responseExtensions.keySet()) {
+                sb.append(responseExtensions.get(extId)).append("\n");
+            }
+        }
+
+        return sb.toString();
+    }
+
+    /**
      * Build a String-Extension map from DER encoded data.
      * @param derVal A {@code DerValue} object built from a SEQUENCE of
      *      extensions
      *
-     * @return A {@code Map} using the OID in string form as the keys.  If no
+     * @return a {@code Map} using the OID in string form as the keys.  If no
      *      extensions are found or an empty SEQUENCE is passed in, then
      *      an empty {@code Map} will be returned.
      *
@@ -694,6 +741,9 @@
 
         for (DerValue extDerVal : extDer) {
             Extension ext = new Extension(extDerVal);
+            if (debug != null) {
+                debug.println("Extension: " + ext);
+            }
             // We don't support any extensions yet. Therefore, if it
             // is critical we must throw an exception because we
             // don't know how to process it.
@@ -710,7 +760,7 @@
     /*
      * A class representing a single OCSP response.
      */
-    final static class SingleResponse implements OCSP.RevocationStatus {
+    public final static class SingleResponse implements OCSP.RevocationStatus {
         private final CertId certId;
         private final CertStatus certStatus;
         private final Date thisUpdate;
@@ -825,23 +875,72 @@
         /*
          * Return the certificate's revocation status code
          */
-        @Override public CertStatus getCertStatus() {
+        @Override
+        public CertStatus getCertStatus() {
             return certStatus;
         }
 
-        private CertId getCertId() {
+        /**
+         * Get the Cert ID that this SingleResponse is for.
+         *
+         * @return the {@code CertId} for this {@code SingleResponse}
+         */
+        public CertId getCertId() {
             return certId;
         }
 
-        @Override public Date getRevocationTime() {
+        /**
+         * Get the {@code thisUpdate} field from this {@code SingleResponse}.
+         *
+         * @return a {@link Date} object containing the thisUpdate date
+         */
+        public Date getThisUpdate() {
+            return (thisUpdate != null ? (Date) thisUpdate.clone() : null);
+        }
+
+        /**
+         * Get the {@code nextUpdate} field from this {@code SingleResponse}.
+         *
+         * @return a {@link Date} object containing the nexUpdate date or
+         * {@code null} if a nextUpdate field is not present in the response.
+         */
+        public Date getNextUpdate() {
+            return (nextUpdate != null ? (Date) nextUpdate.clone() : null);
+        }
+
+        /**
+         * Get the {@code revocationTime} field from this
+         * {@code SingleResponse}.
+         *
+         * @return a {@link Date} object containing the revocationTime date or
+         * {@code null} if the {@code SingleResponse} does not have a status
+         * of {@code REVOKED}.
+         */
+        @Override
+        public Date getRevocationTime() {
             return (revocationTime != null ? (Date) revocationTime.clone() :
                     null);
         }
 
-        @Override public CRLReason getRevocationReason() {
+        /**
+         * Get the {@code revocationReason} field for the
+         * {@code SingleResponse}.
+         *
+         * @return a {@link CRLReason} containing the revocation reason, or
+         * {@code null} if a revocation reason was not provided or the
+         * response status is not {@code REVOKED}.
+         */
+        @Override
+        public CRLReason getRevocationReason() {
             return revocationReason;
         }
 
+        /**
+         * Get the {@code singleExtensions} for this {@code SingleResponse}.
+         *
+         * @return a {@link Map} of {@link Extension} objects, keyed by
+         * their OID value in string form.
+         */
         @Override
         public Map<String, java.security.cert.Extension> getSingleExtensions() {
             return Collections.unmodifiableMap(singleExtensions);
@@ -852,19 +951,22 @@
          */
         @Override public String toString() {
             StringBuilder sb = new StringBuilder();
-            sb.append("SingleResponse:  \n");
+            sb.append("SingleResponse:\n");
             sb.append(certId);
-            sb.append("\nCertStatus: "+ certStatus + "\n");
+            sb.append("\nCertStatus: ").append(certStatus).append("\n");
             if (certStatus == CertStatus.REVOKED) {
-                sb.append("revocationTime is " + revocationTime + "\n");
-                sb.append("revocationReason is " + revocationReason + "\n");
+                sb.append("revocationTime is ");
+                sb.append(revocationTime).append("\n");
+                sb.append("revocationReason is ");
+                sb.append(revocationReason).append("\n");
             }
-            sb.append("thisUpdate is " + thisUpdate + "\n");
+            sb.append("thisUpdate is ").append(thisUpdate).append("\n");
             if (nextUpdate != null) {
-                sb.append("nextUpdate is " + nextUpdate + "\n");
+                sb.append("nextUpdate is ").append(nextUpdate).append("\n");
             }
             for (java.security.cert.Extension ext : singleExtensions.values()) {
-                sb.append("singleExtension: " + ext + "\n");
+                sb.append("singleExtension: ");
+                sb.append(ext.toString()).append("\n");
             }
             return sb.toString();
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/ResponderId.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.provider.certpath;
+
+import java.util.Arrays;
+import java.io.IOException;
+import java.security.PublicKey;
+import javax.security.auth.x500.X500Principal;
+import sun.security.x509.KeyIdentifier;
+import sun.security.util.DerValue;
+
+/**
+ * Class for ResponderId entities as described in RFC6960.  ResponderId objects
+ * are used to uniquely identify OCSP responders.
+ * <p>
+ * The RFC 6960 defines a ResponderID structure as:
+ * <pre>
+ * ResponderID ::= CHOICE {
+ *      byName              [1] Name,
+ *      byKey               [2] KeyHash }
+ *
+ * KeyHash ::= OCTET STRING -- SHA-1 hash of responder's public key
+ * (excluding the tag and length fields)
+ *
+ * Name is defined in RFC 5280.
+ * </pre>
+ *
+ * @see ResponderId.Type
+ * @since 1.9
+ */
+public final class ResponderId {
+
+    /**
+     * A {@code ResponderId} enumeration describing the accepted forms for a
+     * {@code ResponderId}.
+     *
+     * @see ResponderId
+     * @since 1.9
+     */
+    public static enum Type {
+        /**
+         * A BY_NAME {@code ResponderId} will be built from a subject name,
+         * either as an {@code X500Principal} or a DER-encoded byte array.
+         */
+        BY_NAME(1, "byName"),
+
+        /**
+         * A BY_KEY {@code ResponderId} will be built from a public key
+         * identifier, either derived from a {@code PublicKey} or directly
+         * from a DER-encoded byte array containing the key identifier.
+         */
+        BY_KEY(2, "byKey");
+
+        private final int tagNumber;
+        private final String ridTypeName;
+
+        private Type(int value, String name) {
+            this.tagNumber = value;
+            this.ridTypeName = name;
+        }
+
+        public int value() {
+            return tagNumber;
+        }
+
+        @Override
+        public String toString() {
+            return ridTypeName;
+        }
+    }
+
+    private Type type;
+    private X500Principal responderName;
+    private KeyIdentifier responderKeyId;
+    private byte[] encodedRid;
+
+    /**
+     * Constructs a {@code ResponderId} object using an {@code X500Principal}.
+     * When encoded in DER this object will use the BY_NAME option.
+     *
+     * @param subjectName the subject name of the certificate used
+     * to sign OCSP responses.
+     *
+     * @throws IOException if the internal DER-encoding of the
+     *      {@code X500Principal} fails.
+     */
+    public ResponderId(X500Principal subjectName) throws IOException {
+        responderName = subjectName;
+        responderKeyId = null;
+        encodedRid = principalToBytes();
+        type = Type.BY_NAME;
+    }
+
+    /**
+     * Constructs a {@code ResponderId} object using a {@code PublicKey}.
+     * When encoded in DER this object will use the byKey option, a
+     * SHA-1 hash of the responder's public key.
+     *
+     * @param pubKey the the OCSP responder's public key
+     *
+     * @throws IOException if the internal DER-encoding of the
+     *      {@code KeyIdentifier} fails.
+     */
+    public ResponderId(PublicKey pubKey) throws IOException {
+        responderKeyId = new KeyIdentifier(pubKey);
+        responderName = null;
+        encodedRid = keyIdToBytes();
+        type = Type.BY_KEY;
+    }
+
+    /**
+     * Constructs a {@code ResponderId} object from its DER-encoding.
+     *
+     * @param encodedData the DER-encoded bytes
+     *
+     * @throws IOException if the encodedData is not properly DER encoded
+     */
+    public ResponderId(byte[] encodedData) throws IOException {
+        DerValue outer = new DerValue(encodedData);
+
+        if (outer.isContextSpecific((byte)Type.BY_NAME.value())
+                && outer.isConstructed()) {
+            // Use the X500Principal constructor as a way to sanity
+            // check the incoming data.
+            responderName = new X500Principal(outer.getDataBytes());
+            encodedRid = principalToBytes();
+            type = Type.BY_NAME;
+        } else if (outer.isContextSpecific((byte)Type.BY_KEY.value())
+                && outer.isConstructed()) {
+            // Use the KeyIdentifier constructor as a way to sanity
+            // check the incoming data.
+            responderKeyId =
+                new KeyIdentifier(new DerValue(outer.getDataBytes()));
+            encodedRid = keyIdToBytes();
+            type = Type.BY_KEY;
+        } else {
+            throw new IOException("Invalid ResponderId content");
+        }
+    }
+
+    /**
+     * Encode a {@code ResponderId} in DER form
+     *
+     * @return a byte array containing the DER-encoded representation for this
+     *      {@code ResponderId}
+     */
+    public byte[] getEncoded() {
+        return encodedRid.clone();
+    }
+
+    /**
+     * Return the type of {@ResponderId}
+     *
+     * @return a number corresponding to the context-specific tag number
+     *      used in the DER-encoding for a {@code ResponderId}
+     */
+    public ResponderId.Type getType() {
+        return type;
+    }
+
+    /**
+     * Get the length of the encoded {@code ResponderId} (including the tag and
+     * length of the explicit tagging from the outer ASN.1 CHOICE).
+     *
+     * @return the length of the encoded {@code ResponderId}
+     */
+    public int length() {
+        return encodedRid.length;
+    }
+
+    /**
+     * Obtain the underlying {@code X500Principal} from a {@code ResponderId}
+     *
+     * @return the {@code X500Principal} for this {@code ResponderId} if it
+     *      is a BY_NAME variant.  If the {@code ResponderId} is a BY_KEY
+     *      variant, this routine will return {@code null}.
+     */
+    public X500Principal getResponderName() {
+        return responderName;
+    }
+
+    /**
+     * Obtain the underlying key identifier from a {@code ResponderId}
+     *
+     * @return the {@code KeyIdentifier} for this {@code ResponderId} if it
+     *      is a BY_KEY variant.  If the {@code ResponderId} is a BY_NAME
+     *      variant, this routine will return {@code null}.
+     */
+    public KeyIdentifier getKeyIdentifier() {
+        return responderKeyId;
+    }
+
+    /**
+     * Compares the specified object with this {@code ResponderId} for equality.
+     * A ResponderId will only be considered equivalent if both the type and
+     * data value are equal.  Two ResponderIds initialized by name and
+     * key ID, respectively, will not be equal even if the
+     * ResponderId objects are created from the same source certificate.
+     *
+     * @param obj the object to be compared against
+     *
+     * @return true if the specified object is equal to this {@code Responderid}
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
+
+        if (this == obj) {
+            return true;
+        }
+
+        if (obj instanceof ResponderId) {
+            ResponderId respObj = (ResponderId)obj;
+                return Arrays.equals(encodedRid, respObj.getEncoded());
+        }
+
+        return false;
+    }
+
+    /**
+     * Returns the hash code value for this {@code ResponderId}
+     *
+     * @return the hash code value for this {@code ResponderId}
+     */
+    @Override
+    public int hashCode() {
+        return Arrays.hashCode(encodedRid);
+    }
+
+    /**
+     * Create a String representation of this {@code ResponderId}
+     *
+     * @return a String representation of this {@code ResponderId}
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        switch (type) {
+            case BY_NAME:
+                sb.append(type).append(": ").append(responderName);
+                break;
+            case BY_KEY:
+                sb.append(type).append(": ");
+                for (byte keyIdByte : responderKeyId.getIdentifier()) {
+                    sb.append(String.format("%02X", keyIdByte));
+                }
+                break;
+            default:
+                sb.append("Unknown ResponderId Type: ").append(type);
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Convert the responderName data member into its DER-encoded form
+     *
+     * @return the DER encoding for a responder ID byName option, including
+     *      explicit context-specific tagging.
+     *
+     * @throws IOException if any encoding error occurs
+     */
+    private byte[] principalToBytes() throws IOException {
+        DerValue dv = new DerValue(DerValue.createTag(DerValue.TAG_CONTEXT,
+                true, (byte)Type.BY_NAME.value()),
+                responderName.getEncoded());
+        return dv.toByteArray();
+    }
+
+    /**
+     * Convert the responderKeyId data member into its DER-encoded form
+     *
+     * @return the DER encoding for a responder ID byKey option, including
+     *      explicit context-specific tagging.
+     *
+     * @throws IOException if any encoding error occurs
+     */
+    private byte[] keyIdToBytes() throws IOException {
+        // Place the KeyIdentifier bytes into an OCTET STRING
+        DerValue inner = new DerValue(DerValue.tag_OctetString,
+                responderKeyId.getIdentifier());
+
+        // Mark the OCTET STRING-wrapped KeyIdentifier bytes
+        // as EXPLICIT CONTEXT 2
+        DerValue outer = new DerValue(DerValue.createTag(DerValue.TAG_CONTEXT,
+                true, (byte)Type.BY_KEY.value()), inner.toByteArray());
+
+        return outer.toByteArray();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqExtension.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+import java.util.Objects;
+
+/*
+ * RFC6066 defines the TLS extension,"status_request" (type 0x5),
+ * which allows the client to request that the server perform OCSP
+ * on the client's behalf.
+ * The "extension data" field of this extension contains a
+ * "CertificateStatusRequest" structure:
+ *
+ *      struct {
+ *          CertificateStatusType status_type;
+ *          select (status_type) {
+ *              case ocsp: OCSPStatusRequest;
+ *          } request;
+ *      } CertificateStatusRequest;
+ *
+ *      enum { ocsp(1), (255) } CertificateStatusType;
+ *
+ *      struct {
+ *          ResponderID responder_id_list<0..2^16-1>;
+ *          Extensions  request_extensions;
+ *      } OCSPStatusRequest;
+ *
+ *      opaque ResponderID<1..2^16-1>;
+ *      opaque Extensions<0..2^16-1>;
+ */
+
+final class CertStatusReqExtension extends HelloExtension {
+
+    private final StatusRequestType statReqType;
+    private final StatusRequest request;
+
+
+    /**
+     * Construct the default status request extension object.  The default
+     * object results in a status_request extension where the extension
+     * data segment is zero-length.  This is used primarily in ServerHello
+     * messages where the server asserts it can do RFC 6066 status stapling.
+     */
+    CertStatusReqExtension() {
+        super(ExtensionType.EXT_STATUS_REQUEST);
+        statReqType = null;
+        request = null;
+    }
+
+    /**
+     * Construct the status request extension object given a request type
+     *      and {@code StatusRequest} object.
+     *
+     * @param reqType a {@code StatusRequestExtType object correspoding
+     *      to the underlying {@code StatusRequest} object.  A value of
+     *      {@code null} is not allowed.
+     * @param statReq the {@code StatusRequest} object used to provide the
+     *      encoding for the TLS extension.  A value of {@code null} is not
+     *      allowed.
+     *
+     * @throws IllegalArgumentException if the provided {@code StatusRequest}
+     *      does not match the type.
+     * @throws NullPointerException if either the {@code reqType} or
+     *      {@code statReq} arguments are {@code null}.
+     */
+    CertStatusReqExtension(StatusRequestType reqType, StatusRequest statReq) {
+        super(ExtensionType.EXT_STATUS_REQUEST);
+
+        statReqType = Objects.requireNonNull(reqType,
+                "Unallowed null value for status_type");
+        request = Objects.requireNonNull(statReq,
+                "Unallowed null value for request");
+
+        // There is currently only one known status type (OCSP)
+        // We can add more clauses to cover other types in the future
+        if (statReqType == StatusRequestType.OCSP) {
+            if (!(statReq instanceof OCSPStatusRequest)) {
+                throw new IllegalArgumentException("StatusRequest not " +
+                        "of type OCSPStatusRequest");
+            }
+        }
+    }
+
+    /**
+     * Construct the {@code CertStatusReqExtension} object from data read from
+     *      a {@code HandshakeInputStream}
+     *
+     * @param s the {@code HandshakeInputStream} providing the encoded data
+     * @param len the length of the extension data
+     *
+     * @throws IOException if any decoding errors happen during object
+     *      construction.
+     */
+    CertStatusReqExtension(HandshakeInStream s, int len) throws IOException {
+        super(ExtensionType.EXT_STATUS_REQUEST);
+
+        if (len > 0) {
+            // Obtain the status type (first byte)
+            statReqType = StatusRequestType.get(s.getInt8());
+            if (statReqType == StatusRequestType.OCSP) {
+                request = new OCSPStatusRequest(s);
+            } else {
+                // This is a status_type we don't understand.  Create
+                // an UnknownStatusRequest in order to preserve the data
+                request = new UnknownStatusRequest(s, len - 1);
+            }
+        } else {
+            // Treat this as a zero-length extension (i.e. from a ServerHello
+            statReqType = null;
+            request = null;
+        }
+    }
+
+    /**
+     * Return the length of the encoded extension, including extension type,
+     *      extension length and status_type fields.
+     *
+     * @return the length in bytes, including the extension type and
+     *      length fields.
+     */
+    @Override
+    int length() {
+        return (statReqType != null ? 5 + request.length() : 4);
+    }
+
+    /**
+     * Send the encoded TLS extension through a {@code HandshakeOutputStream}
+     *
+     * @param s the {@code HandshakeOutputStream} used to send the encoded data
+     *
+     * @throws IOException tf any errors occur during the encoding process
+     */
+    @Override
+    void send(HandshakeOutStream s) throws IOException {
+        s.putInt16(type.id);
+        s.putInt16(this.length() - 4);
+
+        if (statReqType != null) {
+            s.putInt8(statReqType.id);
+            request.send(s);
+        }
+    }
+
+    /**
+     * Create a string representation of this {@code CertStatusReqExtension}
+     *
+     * @return the string representation of this {@code CertStatusReqExtension}
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder("Extension ").append(type);
+        if (statReqType != null) {
+            sb.append(": ").append(statReqType).append(", ").append(request);
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * Return the type field for this {@code CertStatusReqExtension}
+     *
+     * @return the {@code StatusRequestType} for this extension.  {@code null}
+     *      will be returned if the default constructor is used to create
+     *      a zero length status_request extension (found in ServerHello
+     *      messages)
+     */
+    StatusRequestType getType() {
+        return statReqType;
+    }
+
+    /**
+     * Get the underlying {@code StatusRequest} for this
+     *      {@code CertStatusReqExtension}
+     *
+     * @return the {@code StatusRequest} or {@code null} if the default
+     * constructor was used to create this extension.
+     */
+    StatusRequest getRequest() {
+        return request;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Objects;
+import javax.net.ssl.SSLException;
+
+/*
+ * RFC6961 defines the TLS extension,"status_request_v2" (type 0x5),
+ * which allows the client to request that the server perform OCSP
+ * on the client's behalf.
+ *
+ * The RFC defines an CertStatusReqItemV2 structure:
+ *
+ *      struct {
+ *          CertificateStatusType status_type;
+ *          uint16 request_length;
+ *          select (status_type) {
+ *              case ocsp: OCSPStatusRequest;
+ *              case ocsp_multi: OCSPStatusRequest;
+ *          } request;
+ *      } CertificateStatusRequestItemV2;
+ *
+ *      enum { ocsp(1), ocsp_multi(2), (255) } CertificateStatusType;
+ */
+
+final class CertStatusReqItemV2 implements StatusRequest {
+
+    private final StatusRequestType statReqType;
+    private final StatusRequest request;
+
+    /**
+     * Construct a {@code CertStatusReqItemV2} object using a type value
+     *      and empty ResponderId and Extension lists.
+     *
+     * @param reqType the type of request (e.g. ocsp).  A {@code null} value
+     *      is not allowed.
+     * @param statReq the {@code StatusRequest} object used to provide the
+     *      encoding for this {@code CertStatusReqItemV2}.  A {@code null}
+     *      value is not allowed.
+     *
+     * @throws IllegalArgumentException if the provided {@code StatusRequest}
+     *      does not match the type.
+     * @throws NullPointerException if either the reqType or statReq arguments
+     *      are {@code null}.
+     */
+    CertStatusReqItemV2(StatusRequestType reqType, StatusRequest statReq) {
+        statReqType = Objects.requireNonNull(reqType,
+                "Unallowed null value for status_type");
+        request = Objects.requireNonNull(statReq,
+                "Unallowed null value for request");
+
+        // There is currently only one known status type (OCSP)
+        // We can add more clauses to cover other types in the future
+        if (statReqType.equals(StatusRequestType.OCSP) ||
+                statReqType.equals(StatusRequestType.OCSP_MULTI)) {
+            if (!(statReq instanceof OCSPStatusRequest)) {
+                throw new IllegalArgumentException("StatusRequest not " +
+                        "of type OCSPStatusRequest");
+            }
+        }
+    }
+
+    /**
+     * Construct a {@code CertStatusReqItemV2} object from encoded bytes
+     *
+     * @param requestBytes the encoded bytes for the {@code CertStatusReqItemV2}
+     *
+     * @throws IOException if any decoding errors take place
+     * @throws IllegalArgumentException if the parsed reqType value is not a
+     *      supported status request type.
+     */
+    CertStatusReqItemV2(byte[] reqItemBytes) throws IOException {
+        ByteBuffer reqBuf = ByteBuffer.wrap(reqItemBytes);
+        statReqType = StatusRequestType.get(reqBuf.get());
+        int requestLength = Short.toUnsignedInt(reqBuf.getShort());
+
+        if (requestLength == reqBuf.remaining()) {
+            byte[] statReqBytes = new byte[requestLength];
+            reqBuf.get(statReqBytes);
+            if (statReqType == StatusRequestType.OCSP ||
+                    statReqType == StatusRequestType.OCSP_MULTI) {
+                request = new OCSPStatusRequest(statReqBytes);
+            } else {
+                request = new UnknownStatusRequest(statReqBytes);
+            }
+        } else {
+            throw new SSLException("Incorrect request_length: " +
+                    "Expected " + reqBuf.remaining() + ", got " +
+                    requestLength);
+        }
+    }
+
+    /**
+     * Construct an {@code CertStatusReqItemV2} object from data read from
+     * a {@code HandshakeInputStream}
+     *
+     * @param s the {@code HandshakeInputStream} providing the encoded data
+     *
+     * @throws IOException if any decoding errors happen during object
+     *      construction.
+     * @throws IllegalArgumentException if the parsed reqType value is not a
+     *      supported status request type.
+     */
+    CertStatusReqItemV2(HandshakeInStream in) throws IOException {
+        statReqType = StatusRequestType.get(in.getInt8());
+        int requestLength = in.getInt16();
+
+        if (statReqType == StatusRequestType.OCSP ||
+                statReqType == StatusRequestType.OCSP_MULTI) {
+            request = new OCSPStatusRequest(in);
+        } else {
+            request = new UnknownStatusRequest(in, requestLength);
+        }
+    }
+
+    /**
+     * Return the length of this {@code CertStatusReqItemV2} in its encoded form
+     *
+     * @return the encoded length of this {@code CertStatusReqItemV2}
+     */
+    @Override
+    public int length() {
+        // The length is the the status type (1 byte) + the request length
+        // field (2 bytes) + the StatusRequest data length.
+        return request.length() + 3;
+    }
+
+    /**
+     * Send the encoded {@code CertStatusReqItemV2} through a
+     *      {@code HandshakeOutputStream}
+     *
+     * @param s the {@code HandshakeOutputStream} used to send the encoded data
+     *
+     * @throws IOException if any errors occur during the encoding process
+     */
+    @Override
+    public void send(HandshakeOutStream s) throws IOException {
+        s.putInt8(statReqType.id);
+        s.putInt16(request.length());
+        request.send(s);
+    }
+
+    /**
+     * Create a string representation of this {@code CertStatusReqItemV2}
+     *
+     * @return the string representation of this {@code CertStatusReqItemV2}
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("CertStatusReqItemV2: ").append(statReqType).append(", ");
+        sb.append(request.toString());
+
+        return sb.toString();
+    }
+
+    /**
+     * Return the type field for this {@code CertStatusReqItemV2}
+     *
+     * @return the {@code StatusRequestType} for this extension.
+     */
+    StatusRequestType getType() {
+        return statReqType;
+    }
+
+    /**
+     * Get the underlying {@code StatusRequest} for this
+     *      {@code CertStatusReqItemV2}
+     *
+     * @return the {@code StatusRequest}
+     */
+    StatusRequest getRequest() {
+        return request;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqListV2Extension.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Collections;
+import java.util.ArrayList;
+import java.util.Objects;
+import javax.net.ssl.SSLException;
+
+/*
+ * RFC6066 defines the TLS extension,"status_request" (type 0x5),
+ * which allows the client to request that the server perform OCSP
+ * on the client's behalf.
+ * The "extension data" field of this extension contains a
+ * "CertificateStatusRequest" structure:
+ *
+ *      struct {
+ *          CertificateStatusType status_type;
+ *          select (status_type) {
+ *              case ocsp: OCSPStatusRequest;
+ *          } request;
+ *      } CertificateStatusRequest;
+ *
+ *      enum { ocsp(1), (255) } CertificateStatusType;
+ *
+ *      struct {
+ *          ResponderID responder_id_list<0..2^16-1>;
+ *          Extensions  request_extensions;
+ *      } OCSPStatusRequest;
+ *
+ *      opaque ResponderID<1..2^16-1>;
+ *      opaque Extensions<0..2^16-1>;
+ */
+
+final class CertStatusReqListV2Extension extends HelloExtension {
+
+    private final List<CertStatusReqItemV2> itemList;
+    private final int itemListLength;
+
+    /**
+     * Construct a default {@code CertStatusReqListV2Extension}.  The default
+     * object results in a status_request_v2 extension where the extension
+     * data segment is zero-length.  This is used primarily in ServerHello
+     * messages where the server asserts it can do RFC 6961 status stapling.
+     */
+    CertStatusReqListV2Extension() {
+        super(ExtensionType.EXT_STATUS_REQUEST_V2);
+        itemList = Collections.emptyList();
+        itemListLength = 0;
+    }
+
+    /**
+     * Construct a {@code CertStatusReqListV2Extension} from a provided list
+     *      of {@code CertStatusReqItemV2} objects.
+     *
+     * @param reqList a {@code List} containing one or more
+     *      {@code CertStatusReqItemV2} objects to be included in this TLS
+     *      Hello extension.  Passing an empty list will result in the encoded
+     *      extension having a zero-length extension_data segment, and is
+     *      the same as using the default constructor.
+     *
+     * @throws NullPointerException if reqList is {@code null}
+     */
+    CertStatusReqListV2Extension(List<CertStatusReqItemV2> reqList) {
+        super(ExtensionType.EXT_STATUS_REQUEST_V2);
+        Objects.requireNonNull(reqList,
+                "Unallowed null value for certificate_status_req_list");
+        itemList = Collections.unmodifiableList(new ArrayList<>(reqList));
+        itemListLength = calculateListLength();
+    }
+
+    /**
+     *  Construct the {@code CertStatusReqListV2Extension} object from data
+     *      read from a {@code HandshakeInputStream}
+     *
+     * @param s the {@code HandshakeInputStream} providing the encoded data
+     * @param len the length of the extension data
+     *
+     * @throws IOException if any decoding errors happen during object
+     *      construction.
+     */
+    CertStatusReqListV2Extension(HandshakeInStream s, int len)
+            throws IOException {
+        super(ExtensionType.EXT_STATUS_REQUEST_V2);
+
+        if (len <= 0) {
+            // Handle the empty extension data case (from a ServerHello)
+            itemList = Collections.emptyList();
+            itemListLength = 0;
+        } else {
+            List<CertStatusReqItemV2> workingList = new ArrayList<>();
+
+            itemListLength = s.getInt16();
+            if (itemListLength <= 0) {
+                throw new SSLException("certificate_status_req_list length " +
+                        "must be greater than zero (received length: " +
+                        itemListLength + ")");
+            }
+
+            int totalRead = 0;
+            CertStatusReqItemV2 reqItem;
+            do {
+                reqItem = new CertStatusReqItemV2(s);
+                totalRead += reqItem.length();
+            } while (workingList.add(reqItem) && totalRead < itemListLength);
+
+            // If for some reason the add returns false, we may not have read
+            // all the necessary bytes from the stream.  Check this and throw
+            // an exception if we terminated the loop early.
+            if (totalRead != itemListLength) {
+                throw new SSLException("Not all certificate_status_req_list " +
+                        "bytes were read: expected " + itemListLength +
+                        ", read " + totalRead);
+            }
+
+            itemList = Collections.unmodifiableList(workingList);
+        }
+    }
+
+    /**
+     * Get the list of {@code CertStatusReqItemV2} objects for this extension
+     *
+     * @return an unmodifiable list of {@code CertStatusReqItemV2} objects
+     */
+    List<CertStatusReqItemV2> getRequestItems() {
+        return itemList;
+    }
+
+    /**
+     * Return the length of the encoded extension, including extension type
+     *      and extension length fields.
+     *
+     * @return the length in bytes, including the extension type and
+     *      extension_data length.
+     */
+    @Override
+    int length() {
+        return (itemList.isEmpty() ? 4 : itemListLength + 6);
+    }
+
+    /**
+     * Send the encoded {@code CertStatusReqListV2Extension} through a
+     *      {@code HandshakeOutputStream}
+     *
+     * @param s the {@code HandshakeOutputStream} used to send the encoded data
+     *
+     * @throws IOException if any errors occur during the encoding process
+     */
+    @Override
+    void send(HandshakeOutStream s) throws IOException {
+        s.putInt16(type.id);
+        s.putInt16(this.length() - 4);
+        if (itemListLength > 0) {
+            s.putInt16(itemListLength);
+            for (CertStatusReqItemV2 item : itemList) {
+                item.send(s);
+            }
+        }
+    }
+
+    /**
+     * Create a string representation of this
+     *      {@code CertStatusReqListV2Extension}
+     *
+     * @return the string representation of this
+     *      {@code CertStatusReqListV2Extension}
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder("Extension ").append(type);
+        for (CertStatusReqItemV2 item : itemList) {
+            sb.append("\n").append(item);
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * Determine the length of the certificate_status_req_list field in
+     * the status_request_v2 extension.
+     *
+     * @return the total encoded length of all items in the list, or 0 if the
+     *      encapsulating extension_data is zero-length (from a ServerHello)
+     */
+    private int calculateListLength() {
+        int listLen = 0;
+
+        for (CertStatusReqItemV2 item : itemList) {
+            listLen += item.length();
+        }
+
+        return listLen;
+    }
+
+}
--- a/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java	Mon Aug 10 14:05:37 2015 +0300
@@ -37,10 +37,12 @@
 import java.security.cert.X509Certificate;
 import java.security.cert.CertificateException;
 import java.security.cert.CertificateParsingException;
+import java.security.cert.CertPathValidatorException;
+import java.security.cert.CertPathValidatorException.Reason;
+import java.security.cert.CertPathValidatorException.BasicReason;
 import javax.security.auth.x500.X500Principal;
 
 import javax.crypto.SecretKey;
-import javax.crypto.spec.SecretKeySpec;
 
 import javax.net.ssl.*;
 
@@ -79,6 +81,12 @@
 
     private boolean serverKeyExchangeReceived;
 
+    private final boolean enableStatusRequestExtension =
+            Debug.getBooleanProperty(
+                    "jdk.tls.client.enableStatusRequestExtension", true);
+    private boolean staplingActive = false;
+    private X509Certificate[] deferredCerts;
+
     /*
      * The RSA PreMasterSecret needs to know the version of
      * ClientHello that was used on this handshake.  This represents
@@ -200,7 +208,16 @@
     @Override
     void processMessage(byte type, int messageLen) throws IOException {
         // check the handshake state
-        handshakeState.check(type);
+        List<Byte> ignoredOptStates = handshakeState.check(type);
+
+        // If the state machine has skipped over certificate status
+        // and stapling was enabled, we need to check the chain immediately
+        // because it was deferred, waiting for CertificateStatus.
+        if (staplingActive && ignoredOptStates.contains(
+                HandshakeMessage.ht_certificate_status)) {
+            checkServerCerts(deferredCerts);
+            serverKey = session.getPeerCertificates()[0].getPublicKey();
+        }
 
         switch (type) {
         case HandshakeMessage.ht_hello_request:
@@ -241,8 +258,19 @@
             CertificateMsg certificateMsg = new CertificateMsg(input);
             handshakeState.update(certificateMsg, resumingSession);
             this.serverCertificate(certificateMsg);
-            serverKey =
-                session.getPeerCertificates()[0].getPublicKey();
+            if (!staplingActive) {
+                // If we are not doing stapling, we can set serverKey right
+                // away.  Otherwise, we will wait until verification of the
+                // chain has completed after CertificateStatus;
+                serverKey = session.getPeerCertificates()[0].getPublicKey();
+            }
+            break;
+
+        case HandshakeMessage.ht_certificate_status:
+            CertificateStatus certStatusMsg = new CertificateStatus(input);
+            handshakeState.update(certStatusMsg, resumingSession);
+            this.certificateStatus(certStatusMsg);
+            serverKey = session.getPeerCertificates()[0].getPublicKey();
             break;
 
         case HandshakeMessage.ht_server_key_exchange:
@@ -685,10 +713,22 @@
             ExtensionType type = ext.type;
             if (type == ExtensionType.EXT_SERVER_NAME) {
                 serverNamesAccepted = true;
+            } else if (type == ExtensionType.EXT_STATUS_REQUEST ||
+                    type == ExtensionType.EXT_STATUS_REQUEST_V2) {
+                // Only enable the stapling feature if the client asserted
+                // these extensions.
+                if (enableStatusRequestExtension) {
+                    staplingActive = true;
+                } else {
+                    fatalSE(Alerts.alert_unexpected_message, "Server set " +
+                            type + " extension when not requested by client");
+                }
             } else if ((type != ExtensionType.EXT_ELLIPTIC_CURVES)
                     && (type != ExtensionType.EXT_EC_POINT_FORMATS)
                     && (type != ExtensionType.EXT_SERVER_NAME)
-                    && (type != ExtensionType.EXT_RENEGOTIATION_INFO)) {
+                    && (type != ExtensionType.EXT_RENEGOTIATION_INFO)
+                    && (type != ExtensionType.EXT_STATUS_REQUEST)
+                    && (type != ExtensionType.EXT_STATUS_REQUEST_V2)) {
                 fatalSE(Alerts.alert_unsupported_extension,
                     "Server sent an unsupported extension: " + type);
             }
@@ -1476,6 +1516,12 @@
             }
         }
 
+        // Add status_request and status_request_v2 extensions
+        if (enableStatusRequestExtension) {
+            clientHelloMessage.addCertStatusReqListV2Extension();
+            clientHelloMessage.addCertStatusRequestExtension();
+        }
+
         // reset the client random cookie
         clnt_random = clientHelloMessage.clnt_random;
 
@@ -1545,40 +1591,36 @@
         }
 
         // ask the trust manager to verify the chain
-        X509TrustManager tm = sslContext.getX509TrustManager();
-        try {
-            // find out the key exchange algorithm used
-            // use "RSA" for non-ephemeral "RSA_EXPORT"
-            String keyExchangeString;
-            if (keyExchange == K_RSA_EXPORT && !serverKeyExchangeReceived) {
-                keyExchangeString = K_RSA.name;
-            } else {
-                keyExchangeString = keyExchange.name;
-            }
+        if (staplingActive) {
+            // Defer the certificate check until after we've received the
+            // CertificateStatus message.  If that message doesn't come in
+            // immediately following this message we will execute the check
+            // directly from processMessage before any other SSL/TLS processing.
+            deferredCerts = peerCerts;
+        } else {
+            // We're not doing stapling, so perform the check right now
+            checkServerCerts(peerCerts);
+        }
+    }
 
-            if (tm instanceof X509ExtendedTrustManager) {
-                if (conn != null) {
-                    ((X509ExtendedTrustManager)tm).checkServerTrusted(
-                        peerCerts.clone(),
-                        keyExchangeString,
-                        conn);
-                } else {
-                    ((X509ExtendedTrustManager)tm).checkServerTrusted(
-                        peerCerts.clone(),
-                        keyExchangeString,
-                        engine);
-                }
-            } else {
-                // Unlikely to happen, because we have wrapped the old
-                // X509TrustManager with the new X509ExtendedTrustManager.
-                throw new CertificateException(
-                    "Improper X509TrustManager implementation");
-            }
-        } catch (CertificateException e) {
-            // This will throw an exception, so include the original error.
-            fatalSE(Alerts.alert_certificate_unknown, e);
+    /**
+     * If certificate status stapling has been enabled, the server will send
+     * one or more status messages to the client.
+     *
+     * @param mesg a {@code CertificateStatus} object built from the data
+     *      sent by the server.
+     *
+     * @throws IOException if any parsing errors occur.
+     */
+    private void certificateStatus(CertificateStatus mesg) throws IOException {
+        if (debug != null && Debug.isOn("handshake")) {
+            mesg.print(System.out);
         }
-        session.setPeerCertificates(peerCerts);
+
+        // Perform the certificate check using the deferred certificates
+        // and responses that we have obtained.
+        session.setStatusResponses(mesg.getResponses());
+        checkServerCerts(deferredCerts);
     }
 
     /*
@@ -1700,4 +1742,88 @@
 
         return false;
     }
+
+    /**
+     * Perform client-side checking of server certificates.
+     *
+     * @param certs an array of {@code X509Certificate} objects presented
+     *      by the server in the ServerCertificate message.
+     *
+     * @throws IOException if a failure occurs during validation or
+     *      the trust manager associated with the {@code SSLContext} is not
+     *      an {@code X509ExtendedTrustManager}.
+     */
+    private void checkServerCerts(X509Certificate[] certs)
+            throws IOException {
+        X509TrustManager tm = sslContext.getX509TrustManager();
+
+        // find out the key exchange algorithm used
+        // use "RSA" for non-ephemeral "RSA_EXPORT"
+        String keyExchangeString;
+        if (keyExchange == K_RSA_EXPORT && !serverKeyExchangeReceived) {
+            keyExchangeString = K_RSA.name;
+        } else {
+            keyExchangeString = keyExchange.name;
+        }
+
+        try {
+            if (tm instanceof X509ExtendedTrustManager) {
+                if (conn != null) {
+                    ((X509ExtendedTrustManager)tm).checkServerTrusted(
+                        certs.clone(),
+                        keyExchangeString,
+                        conn);
+                } else {
+                    ((X509ExtendedTrustManager)tm).checkServerTrusted(
+                        certs.clone(),
+                        keyExchangeString,
+                        engine);
+                }
+            } else {
+                // Unlikely to happen, because we have wrapped the old
+                // X509TrustManager with the new X509ExtendedTrustManager.
+                throw new CertificateException(
+                        "Improper X509TrustManager implementation");
+            }
+
+            // Once the server certificate chain has been validated, set
+            // the certificate chain in the TLS session.
+            session.setPeerCertificates(certs);
+        } catch (CertificateException ce) {
+            fatalSE(getCertificateAlert(ce), ce);
+        }
+    }
+
+    /**
+     * When a failure happens during certificate checking from an
+     * {@link X509TrustManager}, determine what TLS alert description to use.
+     *
+     * @param cexc The exception thrown by the {@link X509TrustManager}
+     *
+     * @return A byte value corresponding to a TLS alert description number.
+     */
+    private byte getCertificateAlert(CertificateException cexc) {
+        // The specific reason for the failure will determine how to
+        // set the alert description value
+        byte alertDesc = Alerts.alert_certificate_unknown;
+
+        Throwable baseCause = cexc.getCause();
+        if (baseCause instanceof CertPathValidatorException) {
+            CertPathValidatorException cpve =
+                    (CertPathValidatorException)baseCause;
+            Reason reason = cpve.getReason();
+            if (reason == BasicReason.REVOKED) {
+                alertDesc = staplingActive ?
+                        Alerts.alert_bad_certificate_status_response :
+                        Alerts.alert_certificate_revoked;
+            } else if (reason == BasicReason.UNDETERMINED_REVOCATION_STATUS) {
+                alertDesc = staplingActive ?
+                        Alerts.alert_bad_certificate_status_response :
+                        Alerts.alert_certificate_unknown;
+            }
+        }
+
+        return alertDesc;
+    }
 }
+
--- a/jdk/src/java.base/share/classes/sun/security/ssl/ExtensionType.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/ExtensionType.java	Mon Aug 10 14:05:37 2015 +0300
@@ -44,7 +44,7 @@
     }
 
     static List<ExtensionType> knownExtensions =
-            new ArrayList<ExtensionType>(13);
+            new ArrayList<ExtensionType>(14);
 
     static ExtensionType get(int id) {
         for (ExtensionType ext : knownExtensions) {
@@ -97,6 +97,10 @@
     final static ExtensionType EXT_SIGNATURE_ALGORITHMS =
             e(0x000D, "signature_algorithms");   // IANA registry value: 13
 
+    // extensions defined in RFC 6961
+    final static ExtensionType EXT_STATUS_REQUEST_V2 =
+            e(0x0011, "status_request_v2");      // IANA registry value: 17
+
     // extensions defined in RFC 5746
     final static ExtensionType EXT_RENEGOTIATION_INFO =
             e(0xff01, "renegotiation_info");     // IANA registry value: 65281
--- a/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java	Mon Aug 10 14:05:37 2015 +0300
@@ -49,6 +49,7 @@
 import sun.security.ssl.CipherSuite.*;
 import static sun.security.ssl.CipherSuite.PRF.*;
 import sun.security.util.KeyUtil;
+import sun.security.provider.certpath.OCSPResponse;
 
 /**
  * Many data structures are involved in the handshake messages.  These
@@ -393,6 +394,24 @@
         cookieDigest.update(hos.toByteArray());
     }
 
+    // Add status_request extension type
+    void addCertStatusRequestExtension() {
+        extensions.add(new CertStatusReqExtension(StatusRequestType.OCSP,
+                new OCSPStatusRequest()));
+    }
+
+    // Add status_request_v2 extension type
+    void addCertStatusReqListV2Extension() {
+        // Create a default OCSPStatusRequest that we can use for both
+        // OCSP_MULTI and OCSP request list items.
+        OCSPStatusRequest osr = new OCSPStatusRequest();
+        List<CertStatusReqItemV2> itemList = new ArrayList<>(2);
+        itemList.add(new CertStatusReqItemV2(StatusRequestType.OCSP_MULTI,
+                osr));
+        itemList.add(new CertStatusReqItemV2(StatusRequestType.OCSP, osr));
+        extensions.add(new CertStatusReqListV2Extension(itemList));
+    }
+
     @Override
     int messageType() { return ht_client_hello; }
 
@@ -636,6 +655,240 @@
 }
 
 /*
+ * CertificateStatus ... SERVER --> CLIENT
+ *
+ * When a ClientHello asserting the status_request or status_request_v2
+ * extensions is accepted by the server, it will fetch and return one
+ * or more status responses in this handshake message.
+ *
+ * NOTE: Like the Certificate handshake message, this can potentially
+ * be a very large message both due to the size of multiple status
+ * responses and the certificate chains that are often attached to them.
+ * Up to 2^24 bytes of status responses may be sent, possibly fragmented
+ * over multiple TLS records.
+ */
+static final class CertificateStatus extends HandshakeMessage
+{
+    private final StatusRequestType statusType;
+    private int encodedResponsesLen;
+    private int messageLength = -1;
+    private List<byte[]> encodedResponses;
+
+    @Override
+    int messageType() { return ht_certificate_status; }
+
+    /**
+     * Create a CertificateStatus message from the certificates and their
+     * respective OCSP responses
+     *
+     * @param type an indication of the type of response (OCSP or OCSP_MULTI)
+     * @param responses a {@code List} of OCSP responses in DER-encoded form.
+     *      For the OCSP type, only the first entry in the response list is
+     *      used, and must correspond to the end-entity certificate sent to the
+     *      peer.  Zero-length or null values for the response data are not
+     *      allowed for the OCSP type.  For the OCSP_MULTI type, each entry in
+     *      the list should match its corresponding certificate sent in the
+     *      Server Certificate message.  Where an OCSP response does not exist,
+     *      either a zero-length array or a null value should be used.
+     *
+     * @throws SSLException if an unsupported StatusRequestType or invalid
+     *      OCSP response data is provided.
+     */
+    CertificateStatus(StatusRequestType type, X509Certificate[] chain,
+            Map<X509Certificate, byte[]> responses) throws SSLException {
+        statusType = type;
+        encodedResponsesLen = 0;
+        encodedResponses = new ArrayList<>(chain.length);
+
+        Objects.requireNonNull(chain, "Null chain not allowed");
+        Objects.requireNonNull(responses, "Null responses not allowed");
+
+        if (statusType == StatusRequestType.OCSP) {
+            // Just get the response for the end-entity certificate
+            byte[] respDER = responses.get(chain[0]);
+            if (respDER != null && respDER.length > 0) {
+                encodedResponses.add(respDER);
+                encodedResponsesLen = 3 + respDER.length;
+            } else {
+                throw new SSLHandshakeException("Zero-length or null " +
+                        "OCSP Response");
+            }
+        } else if (statusType == StatusRequestType.OCSP_MULTI) {
+            for (X509Certificate cert : chain) {
+                byte[] respDER = responses.get(cert);
+                if (respDER != null) {
+                    encodedResponses.add(respDER);
+                    encodedResponsesLen += (respDER.length + 3);
+                } else {
+                    // If we cannot find a response for a given certificate
+                    // then use a zero-length placeholder.
+                    encodedResponses.add(new byte[0]);
+                    encodedResponsesLen += 3;
+                }
+            }
+        } else {
+            throw new SSLHandshakeException("Unsupported StatusResponseType: " +
+                    statusType);
+        }
+    }
+
+    /**
+     * Decode the CertificateStatus handshake message coming from a
+     * {@code HandshakeInputStream}.
+     *
+     * @param input the {@code HandshakeInputStream} containing the
+     * CertificateStatus message bytes.
+     *
+     * @throws SSLHandshakeException if a zero-length response is found in the
+     * OCSP response type, or an unsupported response type is detected.
+     * @throws IOException if a decoding error occurs.
+     */
+    CertificateStatus(HandshakeInStream input) throws IOException {
+        encodedResponsesLen = 0;
+        encodedResponses = new ArrayList<>();
+
+        statusType = StatusRequestType.get(input.getInt8());
+        if (statusType == StatusRequestType.OCSP) {
+            byte[] respDER = input.getBytes24();
+            // Convert the incoming bytes to a OCSPResponse strucutre
+            if (respDER.length > 0) {
+                encodedResponses.add(respDER);
+                encodedResponsesLen = 3 + respDER.length;
+            } else {
+                throw new SSLHandshakeException("Zero-length OCSP Response");
+            }
+        } else if (statusType == StatusRequestType.OCSP_MULTI) {
+            int respListLen = input.getInt24();
+            encodedResponsesLen = respListLen;
+
+            // Add each OCSP reponse into the array list in the order
+            // we receive them off the wire.  A zero-length array is
+            // allowed for ocsp_multi, and means that a response for
+            // a given certificate is not available.
+            while (respListLen > 0) {
+                byte[] respDER = input.getBytes24();
+                encodedResponses.add(respDER);
+                respListLen -= (respDER.length + 3);
+            }
+
+            if (respListLen != 0) {
+                throw new SSLHandshakeException(
+                        "Bad OCSP response list length");
+            }
+        } else {
+            throw new SSLHandshakeException("Unsupported StatusResponseType: " +
+                    statusType);
+        }
+    }
+
+    /**
+     * Get the length of the CertificateStatus message.
+     *
+     * @return the length of the message in bytes.
+     */
+    @Override
+    int messageLength() {
+        int len = 1;            // Length + Status type
+
+        if (messageLength == -1) {
+            if (statusType == StatusRequestType.OCSP) {
+                len += encodedResponsesLen;
+            } else if (statusType == StatusRequestType.OCSP_MULTI) {
+                len += 3 + encodedResponsesLen;
+            }
+            messageLength = len;
+        }
+
+        return messageLength;
+    }
+
+    /**
+     * Encode the CertificateStatus handshake message and place it on a
+     * {@code HandshakeOutputStream}.
+     *
+     * @param s the HandshakeOutputStream that will the message bytes.
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    @Override
+    void send(HandshakeOutStream s) throws IOException {
+        s.putInt8(statusType.id);
+        if (statusType == StatusRequestType.OCSP) {
+            s.putBytes24(encodedResponses.get(0));
+        } else if (statusType == StatusRequestType.OCSP_MULTI) {
+            s.putInt24(encodedResponsesLen);
+            for (byte[] respBytes : encodedResponses) {
+                if (respBytes != null) {
+                    s.putBytes24(respBytes);
+                } else {
+                    s.putBytes24(null);
+                }
+            }
+        } else {
+            // It is highly unlikely that we will fall into this section of
+            // the code.
+            throw new SSLHandshakeException("Unsupported status_type: " +
+                    statusType.id);
+        }
+    }
+
+    /**
+     * Display a human-readable representation of the CertificateStatus message.
+     *
+     * @param s the PrintStream used to display the message data.
+     *
+     * @throws IOException if any errors occur while parsing the OCSP response
+     * bytes into a readable form.
+     */
+    @Override
+    void print(PrintStream s) throws IOException {
+        s.println("*** CertificateStatus");
+        if (debug != null && Debug.isOn("verbose")) {
+            s.println("Type: " + statusType);
+            if (statusType == StatusRequestType.OCSP) {
+                OCSPResponse oResp = new OCSPResponse(encodedResponses.get(0));
+                s.println(oResp);
+            } else if (statusType == StatusRequestType.OCSP_MULTI) {
+                int numResponses = encodedResponses.size();
+                s.println(numResponses +
+                        (numResponses == 1 ? " entry:" : " entries:"));
+                for (byte[] respDER : encodedResponses) {
+                    if (respDER.length > 0) {
+                        OCSPResponse oResp = new OCSPResponse(respDER);
+                        s.println(oResp);
+                    } else {
+                        s.println("<Zero-length entry>");
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Get the type of CertificateStatus message
+     *
+     * @return the {@code StatusRequestType} for this CertificateStatus
+     *      message.
+     */
+    StatusRequestType getType() {
+        return statusType;
+    }
+
+    /**
+     * Get the list of non-zero length OCSP responses.
+     * The responses returned in this list can be used to map to
+     * {@code X509Certificate} objects provided by the peer and
+     * provided to a {@code PKIXRevocationChecker}.
+     *
+     * @return an unmodifiable List of zero or more byte arrays, each one
+     *      consisting of a single status response.
+     */
+    List<byte[]> getResponses() {
+        return Collections.unmodifiableList(encodedResponses);
+    }
+}
+
+/*
  * ServerKeyExchange ... SERVER --> CLIENT
  *
  * The cipher suite selected, when combined with the certificate exchanged,
--- a/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeStateManager.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/HandshakeStateManager.java	Mon Aug 10 14:05:37 2015 +0300
@@ -25,12 +25,12 @@
 
 package sun.security.ssl;
 
+import java.util.Collections;
+import java.util.List;
 import java.util.LinkedList;
 import java.util.HashMap;
 import javax.net.ssl.SSLProtocolException;
 
-import sun.security.ssl.HandshakeMessage.*;
-
 import static sun.security.ssl.CipherSuite.KeyExchange;
 import static sun.security.ssl.CipherSuite.KeyExchange.*;
 import static sun.security.ssl.HandshakeStateManager.HandshakeState.*;
@@ -311,7 +311,7 @@
         HS_SERVER_CHANGE_CIPHER_SPEC(
                 "server change_cipher_spec",
                 HandshakeMessage.ht_not_applicable),
-        HS_SERVER_FINISHDE(
+        HS_SERVER_FINISHED(
                 "server finished",
                 HandshakeMessage.ht_finished);
 
@@ -343,7 +343,8 @@
         return upcomingStates.isEmpty();
     }
 
-    void check(byte handshakeType) throws SSLProtocolException {
+    List<Byte> check(byte handshakeType) throws SSLProtocolException {
+        List<Byte> ignoredOptional = new LinkedList<>();
         String exceptionMsg =
                  "Handshake message sequence violation, " + handshakeType;
 
@@ -362,27 +363,28 @@
             }
 
             // It is a kickstart message.
-            return;
+            return Collections.emptyList();
         }
 
-        // Ignore the checking for HelloRequest messages as they are
+        // Ignore the checking for HelloRequest messages as they
         // may be sent by the server at any time.
         if (handshakeType == HandshakeMessage.ht_hello_request) {
-            return;
+            return Collections.emptyList();
         }
 
         for (HandshakeState handshakeState : upcomingStates) {
             if (handshakeState.handshakeType == handshakeType) {
                 // It's the expected next handshake type.
-                return;
+                return ignoredOptional;
             }
 
             if (handshakeState.isOptional) {
+                ignoredOptional.add(handshakeState.handshakeType);
                 continue;
             } else {
                 for (HandshakeState alternative : alternatives) {
                     if (alternative.handshakeType == handshakeType) {
-                        return;
+                        return ignoredOptional;
                     }
 
                     if (alternative.isOptional) {
@@ -541,7 +543,7 @@
             //              (Server Finished Flight)
             //              HS_NEW_SESSION_TICKET
             //          --> HS_SERVER_CHANGE_CIPHER_SPEC
-            //          --> HS_SERVER_FINISHDE
+            //          --> HS_SERVER_FINISHED
             //              (Client Finished Flight)
             //          --> HS_CLIENT_CHANGE_CIPHER_SPEC
             //          --> HS_CLEINT_FINISHED
@@ -587,7 +589,7 @@
 
                 // Mandatory server ChangeCipherSpec and Finished messages
                 upcomingStates.add(HS_SERVER_CHANGE_CIPHER_SPEC);
-                upcomingStates.add(HS_SERVER_FINISHDE);
+                upcomingStates.add(HS_SERVER_FINISHED);
 
                 // Mandatory client ChangeCipherSpec and Finished messages
                 upcomingStates.add(HS_CLIENT_CHANGE_CIPHER_SPEC);
@@ -598,15 +600,11 @@
                 // boolean hasSupplementalDataExt =
                 //     (hes.get(HandshakeMessage.ht_supplemental_data) != null);
 
-                // Not support CertificateStatus extension yet.
-                //
-                // boolean hasCertificateStatusExt =
-                //    (hes.get(HandshakeMessage.ht_certificate_status) != null);
-
                 // Not support CertificateURL extension yet.
                 //
                 // boolean hasCertificateUrlExt =
-                //     (hes.get(HandshakeMessage.ht_certificate_url) != null);
+                //     (hes.get(ExtensionType EXT_CLIENT_CERTIFICATE_URL)
+                //          != null);
 
                 // Not support SupplementalData extension yet.
                 //
@@ -625,12 +623,11 @@
                     upcomingStates.add(HS_SERVER_CERTIFICATE);
                 }
 
-                // Not support CertificateStatus extension yet.
-                //
-                // // Optional CertificateStatus message
-                // if (hasCertificateStatusExt) {
-                //     upcomingStates.add(HS_CERTIFICATE_STATUS);
-                // }
+                // Optional CertificateStatus message
+                if (hes.get(ExtensionType.EXT_STATUS_REQUEST) != null ||
+                        hes.get(ExtensionType.EXT_STATUS_REQUEST_V2) != null) {
+                    upcomingStates.add(HS_CERTIFICATE_STATUS);
+                }
 
                 // Need ServerKeyExchange message or not?
                 if ((keyExchange == K_RSA_EXPORT) ||
@@ -690,7 +687,7 @@
 
                 // Mandatory server ChangeCipherSpec and Finished messages
                 upcomingStates.add(HS_SERVER_CHANGE_CIPHER_SPEC);
-                upcomingStates.add(HS_SERVER_FINISHDE);
+                upcomingStates.add(HS_SERVER_FINISHED);
             }
 
             break;
--- a/jdk/src/java.base/share/classes/sun/security/ssl/HelloExtensions.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/HelloExtensions.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -87,6 +87,10 @@
                 extension = new RenegotiationInfoExtension(s, extlen);
             } else if (extType == ExtensionType.EXT_MAX_FRAGMENT_LENGTH) {
                 extension = new MaxFragmentLengthExtension(s, extlen);
+            } else if (extType == ExtensionType.EXT_STATUS_REQUEST) {
+                extension = new CertStatusReqExtension(s, extlen);
+            } else if (extType == ExtensionType.EXT_STATUS_REQUEST_V2) {
+                extension = new CertStatusReqListV2Extension(s, extlen);
             } else {
                 extension = new UnknownExtension(s, extlen, extType);
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/OCSPStatusRequest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,358 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.security.cert.Extension;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Collections;
+import javax.net.ssl.SSLException;
+import sun.security.util.DerValue;
+import sun.security.util.DerInputStream;
+import sun.security.util.DerOutputStream;
+import sun.security.provider.certpath.ResponderId;
+
+/*
+ * RFC6066 defines the TLS extension,"status_request" (type 0x5),
+ * which allows the client to request that the server perform OCSP
+ * on the client's behalf.
+ *
+ * The RFC defines an OCSPStatusRequest structure:
+ *
+ *      struct {
+ *          ResponderID responder_id_list<0..2^16-1>;
+ *          Extensions  request_extensions;
+ *      } OCSPStatusRequest;
+ */
+final class OCSPStatusRequest implements StatusRequest {
+
+    private final List<ResponderId> responderIds;
+    private final List<Extension> extensions;
+    private int encodedLen;
+    private int ridListLen;
+    private int extListLen;
+
+    /**
+     * Construct a default {@code OCSPStatusRequest} object with empty
+     * responder ID and code extension list fields.
+     */
+    OCSPStatusRequest() {
+        responderIds = new ArrayList<>();
+        extensions = new ArrayList<>();
+        encodedLen = this.length();
+    }
+
+    /**
+     * Construct an {@code OCSPStatusRequest} object using the provided
+     *      {@code ResponderId} and {@code Extension} lists.
+     *
+     * @param respIds the list of {@code ResponderId} objects to be placed
+     *      into the {@code OCSPStatusRequest}.  If the user wishes to place
+     *      no {@code ResponderId} objects in the request, either an empty
+     *      {@code List} or {@code null} is acceptable.
+     * @param exts the list of {@code Extension} objects to be placed into
+     *      the {@code OCSPStatusRequest}  If the user wishes to place
+     *      no {@code Extension} objects in the request, either an empty
+     *      {@code List} or {@code null} is acceptable.
+     */
+    OCSPStatusRequest(List<ResponderId> respIds, List<Extension> exts) {
+        responderIds = new ArrayList<>(respIds != null ? respIds :
+                Collections.emptyList());
+        extensions = new ArrayList<>(exts != null ? exts :
+                Collections.emptyList());
+        encodedLen = this.length();
+    }
+
+    /**
+     * Construct an {@code OCSPStatusRequest} object from data read from
+     * a {@code HandshakeInputStream}
+     *
+     * @param s the {@code HandshakeInputStream} providing the encoded data
+     *
+     * @throws IOException if any decoding errors happen during object
+     *      construction.
+     */
+    OCSPStatusRequest(HandshakeInStream in) throws IOException {
+        responderIds = new ArrayList<>();
+        extensions = new ArrayList<>();
+
+        int ridListBytesRemaining = in.getInt16();
+        while (ridListBytesRemaining != 0) {
+            byte[] ridBytes = in.getBytes16();
+            responderIds.add(new ResponderId(ridBytes));
+            ridListBytesRemaining -= (ridBytes.length + 2);
+            // Make sure that no individual responder ID's length caused an
+            // overrun relative to the outer responder ID list length
+            if (ridListBytesRemaining < 0) {
+                throw new SSLException("Responder ID length overflow: " +
+                        "current rid = " + ridBytes.length + ", remaining = " +
+                        ridListBytesRemaining);
+            }
+        }
+
+        int extensionLength = in.getInt16();
+        if (extensionLength > 0) {
+            byte[] extensionData = new byte[extensionLength];
+            in.read(extensionData);
+            DerInputStream dis = new DerInputStream(extensionData);
+            DerValue[] extSeqContents = dis.getSequence(extensionData.length);
+            for (DerValue extDerVal : extSeqContents) {
+                extensions.add(new sun.security.x509.Extension(extDerVal));
+            }
+        }
+    }
+
+    /**
+     * Construct an {@code OCSPStatusRequest} from its encoded form
+     *
+     * @param requestBytes the status request extension bytes
+     *
+     * @throws IOException if any error occurs during decoding
+     */
+    OCSPStatusRequest(byte[] requestBytes) throws IOException {
+        responderIds = new ArrayList<>();
+        extensions = new ArrayList<>();
+        ByteBuffer reqBuf = ByteBuffer.wrap(requestBytes);
+
+        // Get the ResponderId list length
+        encodedLen = requestBytes.length;
+        ridListLen = Short.toUnsignedInt(reqBuf.getShort());
+        int endOfRidList = reqBuf.position() + ridListLen;
+
+        // The end position of the ResponderId list in the ByteBuffer
+        // should be at least 2 less than the end of the buffer.  This
+        // 2 byte defecit is the minimum length required to encode a
+        // zero-length extensions segment.
+        if (reqBuf.limit() - endOfRidList < 2) {
+            throw new SSLException
+                ("ResponderId List length exceeds provided buffer - Len: "
+                 + ridListLen + ", Buffer: " + reqBuf.remaining());
+        }
+
+        while (reqBuf.position() < endOfRidList) {
+            int ridLength = Short.toUnsignedInt(reqBuf.getShort());
+            // Make sure an individual ResponderId length doesn't
+            // run past the end of the ResponderId list portion of the
+            // provided buffer.
+            if (reqBuf.position() + ridLength > endOfRidList) {
+                throw new SSLException
+                    ("ResponderId length exceeds list length - Off: "
+                     + reqBuf.position() + ", Length: " + ridLength
+                     + ", End offset: " + endOfRidList);
+            }
+
+            // Consume/add the ResponderId
+            if (ridLength > 0) {
+                byte[] ridData = new byte[ridLength];
+                reqBuf.get(ridData);
+                responderIds.add(new ResponderId(ridData));
+            }
+        }
+
+        // Get the Extensions length
+        int extensionsLen = Short.toUnsignedInt(reqBuf.getShort());
+
+        // The end of the extensions should also be the end of the
+        // encoded OCSPStatusRequest
+        if (extensionsLen != reqBuf.remaining()) {
+            throw new SSLException("Incorrect extensions length: Read "
+                    + extensionsLen + ", Data length: " + reqBuf.remaining());
+        }
+
+        // Extensions are a SEQUENCE of Extension
+        if (extensionsLen > 0) {
+            byte[] extensionData = new byte[extensionsLen];
+            reqBuf.get(extensionData);
+            DerInputStream dis = new DerInputStream(extensionData);
+            DerValue[] extSeqContents = dis.getSequence(extensionData.length);
+            for (DerValue extDerVal : extSeqContents) {
+                extensions.add(new sun.security.x509.Extension(extDerVal));
+            }
+        }
+    }
+
+    /**
+     * Obtain the length of the {@code OCSPStatusRequest} object in its
+     *      encoded form
+     *
+     * @return the length of the {@code OCSPStatusRequest} object in its
+     *      encoded form
+     */
+    @Override
+    public int length() {
+        // If we've previously calculated encodedLen simply return it
+        if (encodedLen != 0) {
+            return encodedLen;
+        }
+
+        ridListLen = 0;
+        for (ResponderId rid : responderIds) {
+            ridListLen += rid.length() + 2;
+        }
+
+        extListLen = 0;
+        if (!extensions.isEmpty()) {
+            try {
+                DerOutputStream extSequence = new DerOutputStream();
+                DerOutputStream extEncoding = new DerOutputStream();
+                for (Extension ext : extensions) {
+                    ext.encode(extEncoding);
+                }
+                extSequence.write(DerValue.tag_Sequence, extEncoding);
+                extListLen = extSequence.size();
+            } catch (IOException ioe) {
+                // Not sure what to do here
+            }
+        }
+
+        // Total length is the responder ID list length and extensions length
+        // plus each lists' 2-byte length fields.
+        encodedLen = ridListLen + extListLen + 4;
+
+        return encodedLen;
+    }
+
+    /**
+     * Send the encoded {@code OCSPStatusRequest} out through the provided
+     *      {@code HandshakeOutputStream}
+     *
+     * @param s the {@code HandshakeOutputStream} on which to send the encoded
+     *      data
+     *
+     * @throws IOException if any encoding errors occur
+     */
+    @Override
+    public void send(HandshakeOutStream s) throws IOException {
+        s.putInt16(ridListLen);
+        for (ResponderId rid : responderIds) {
+            s.putBytes16(rid.getEncoded());
+        }
+
+        DerOutputStream seqOut = new DerOutputStream();
+        DerOutputStream extBytes = new DerOutputStream();
+
+        if (extensions.size() > 0) {
+            for (Extension ext : extensions) {
+                ext.encode(extBytes);
+            }
+            seqOut.write(DerValue.tag_Sequence, extBytes);
+        }
+        s.putBytes16(seqOut.toByteArray());
+    }
+
+    /**
+     * Determine if a provided {@code OCSPStatusRequest} objects is equal to
+     *      this one.
+     *
+     * @param obj an {@code OCSPStatusRequest} object to be compared against
+     *
+     * @return {@code true} if the objects are equal, {@code false} otherwise.
+     *      Equivalence is established if the lists of responder IDs and
+     *      extensions between the two objects are also equal.
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        } else if (this == obj) {
+            return true;
+        } else if (obj instanceof OCSPStatusRequest) {
+            OCSPStatusRequest respObj = (OCSPStatusRequest)obj;
+            return responderIds.equals(respObj.getResponderIds()) &&
+                extensions.equals(respObj.getExtensions());
+        }
+
+        return false;
+    }
+
+    /**
+     * Returns the hash code value for this {@code OCSPStatusRequest}
+     *
+     * @return the hash code value for this {@code OCSPStatusRequest}
+     */
+    @Override
+    public int hashCode() {
+        int result = 17;
+
+        result = 31 * result + responderIds.hashCode();
+        result = 31 * result + extensions.hashCode();
+
+        return result;
+    }
+
+    /**
+     * Create a string representation of this {@code OCSPStatusRequest}
+     *
+     * @return a string representation of this {@code OCSPStatusRequest}
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("OCSPStatusRequest\n");
+        sb.append("    ResponderIds:");
+
+        if (responderIds.isEmpty()) {
+            sb.append(" <EMPTY>");
+        } else {
+            for (ResponderId rid : responderIds) {
+                sb.append("\n    ").append(rid.toString());
+            }
+        }
+
+        sb.append("\n").append("    Extensions:");
+        if (extensions.isEmpty()) {
+            sb.append(" <EMPTY>");
+        } else {
+            for (Extension ext : extensions) {
+                sb.append("\n    ").append(ext.toString());
+            }
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * Get the list of {@code ResponderId} objects for this
+     *      {@code OCSPStatusRequest}
+     *
+     * @return an unmodifiable {@code List} of {@code ResponderId} objects
+     */
+    List<ResponderId> getResponderIds() {
+        return Collections.unmodifiableList(responderIds);
+    }
+
+    /**
+     * Get the list of {@code Extension} objects for this
+     *      {@code OCSPStatusRequest}
+     *
+     * @return an unmodifiable {@code List} of {@code Extension} objects
+     */
+    List<Extension> getExtensions() {
+        return Collections.unmodifiableList(extensions);
+    }
+}
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,6 +65,8 @@
     // DTLS cookie exchange manager
     private HelloCookieManager helloCookieManager;
 
+    private StatusResponseManager statusResponseManager;
+
     SSLContextImpl() {
         ephemeralKeyManager = new EphemeralKeyManager();
         clientCache = new SSLSessionContextImpl();
@@ -88,6 +90,7 @@
             }
         }
         trustManager = chooseTrustManager(tm);
+        statusResponseManager = new StatusResponseManager();
 
         if (sr == null) {
             secureRandom = JsseJce.getSecureRandom();
@@ -256,6 +259,10 @@
                 "Cookie exchange applies to DTLS only");
     }
 
+    StatusResponseManager getStatusResponseManager() {
+        return statusResponseManager;
+    }
+
     abstract SSLParameters getDefaultServerSSLParams();
     abstract SSLParameters getDefaultClientSSLParams();
     abstract SSLParameters getSupportedSSLParams();
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLSessionImpl.java	Mon Aug 10 14:05:37 2015 +0300
@@ -108,6 +108,7 @@
     private String[]            localSupportedSignAlgs;
     private String[]            peerSupportedSignAlgs;
     private List<SNIServerName>    requestedServerNames;
+    private List<byte[]>        statusResponses;
 
     private int                 negotiatedMaxFragLen;
     private int                 maximumPacketSize;
@@ -180,6 +181,7 @@
         localSupportedSignAlgs =
             SignatureAndHashAlgorithm.getAlgorithmNames(algorithms);
         negotiatedMaxFragLen = -1;
+        statusResponses = null;
 
         if (debug != null && Debug.isOn("session")) {
             System.out.println("%% Initialized:  " + this);
@@ -226,6 +228,19 @@
     }
 
     /**
+     * Provide status response data obtained during the SSL handshake.
+     *
+     * @param responses a {@link List} of responses in binary form.
+     */
+    void setStatusResponses(List<byte[]> responses) {
+        if (responses != null && !responses.isEmpty()) {
+            statusResponses = responses;
+        } else {
+            statusResponses = Collections.emptyList();
+        }
+    }
+
+    /**
      * Set the peer principal.
      */
     void setPeerPrincipal(Principal principal) {
@@ -532,6 +547,30 @@
     }
 
     /**
+     * Return a List of status responses presented by the peer.
+     * Note: This method can be used only when using certificate-based
+     * server authentication; otherwise an empty {@code List} will be returned.
+     *
+     * @return an unmodifiable {@code List} of byte arrays, each consisting
+     * of a DER-encoded OCSP response (see RFC 6960).  If no responses have
+     * been presented by the server or non-certificate based server
+     * authentication is used then an empty {@code List} is returned.
+     */
+    @Override
+    public List<byte[]> getStatusResponses() {
+        if (statusResponses == null || statusResponses.isEmpty()) {
+            return Collections.emptyList();
+        } else {
+            // Clone both the list and the contents
+            List<byte[]> responses = new ArrayList<>(statusResponses.size());
+            for (byte[] respBytes : statusResponses) {
+                responses.add(respBytes.clone());
+            }
+            return Collections.unmodifiableList(responses);
+        }
+    }
+
+    /**
      * Returns the identity of the peer which was established as part of
      * defining the session.
      *
--- a/jdk/src/java.base/share/classes/sun/security/ssl/ServerHandshaker.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/ServerHandshaker.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,6 +28,7 @@
 
 import java.io.*;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 import java.security.*;
 import java.security.cert.*;
 import java.security.interfaces.*;
@@ -36,9 +37,9 @@
 
 import javax.crypto.SecretKey;
 import javax.crypto.spec.SecretKeySpec;
-
 import javax.net.ssl.*;
 
+import sun.security.action.GetLongAction;
 import sun.security.util.KeyUtil;
 import sun.security.util.LegacyAlgorithmConstraints;
 import sun.security.action.GetPropertyAction;
@@ -57,11 +58,16 @@
  */
 final class ServerHandshaker extends Handshaker {
 
+    // The default number of milliseconds the handshaker will wait for
+    // revocation status responses.
+    private static final long DEFAULT_STATUS_RESP_DELAY = 5000;
+
     // is the server going to require the client to authenticate?
     private ClientAuthType      doClientAuth;
 
     // our authentication info
     private X509Certificate[]   certs;
+    private Map<X509Certificate, byte[]> responseMap;
     private PrivateKey          privateKey;
 
     private Object              serviceCreds;
@@ -112,6 +118,13 @@
                     LegacyAlgorithmConstraints.PROPERTY_TLS_LEGACY_ALGS,
                     new SSLAlgorithmDecomposer());
 
+    // To switch off the status_request[_v2] extensions
+    private final static boolean enableStatusRequestExtension =
+            Debug.getBooleanProperty(
+                    "jdk.tls.server.enableStatusRequestExtension", false);
+    private boolean staplingActive = false;
+    private long statusRespTimeout;
+
     static {
         String property = AccessController.doPrivileged(
                     new GetPropertyAction("jdk.tls.ephemeralDHKeySize"));
@@ -159,6 +172,11 @@
                 activeProtocolVersion, isInitialHandshake, secureRenegotiation,
                 clientVerifyData, serverVerifyData);
         doClientAuth = clientAuth;
+        statusRespTimeout = AccessController.doPrivileged(
+                    new GetLongAction("jdk.tls.stapling.responseTimeout",
+                        DEFAULT_STATUS_RESP_DELAY));
+        statusRespTimeout = statusRespTimeout >= 0 ? statusRespTimeout :
+                DEFAULT_STATUS_RESP_DELAY;
     }
 
     /*
@@ -176,6 +194,11 @@
                 activeProtocolVersion, isInitialHandshake, secureRenegotiation,
                 clientVerifyData, serverVerifyData, isDTLS);
         doClientAuth = clientAuth;
+        statusRespTimeout = AccessController.doPrivileged(
+                    new GetLongAction("jdk.tls.stapling.responseTimeout",
+                        DEFAULT_STATUS_RESP_DELAY));
+        statusRespTimeout = statusRespTimeout >= 0 ? statusRespTimeout :
+                DEFAULT_STATUS_RESP_DELAY;
     }
 
     /*
@@ -529,6 +552,16 @@
             }
         }
 
+        // Check if the client has asserted the status_request[_v2] extension(s)
+        CertStatusReqExtension statReqExt = (CertStatusReqExtension)
+                    mesg.extensions.get(ExtensionType.EXT_STATUS_REQUEST);
+        CertStatusReqListV2Extension statReqExtV2 =
+                (CertStatusReqListV2Extension)mesg.extensions.get(
+                        ExtensionType.EXT_STATUS_REQUEST_V2);
+        // Keep stapling active if at least one of the extensions has been set
+        staplingActive = enableStatusRequestExtension &&
+                (statReqExt != null || statReqExtV2 != null);
+
         /*
          * FIRST, construct the ServerHello using the options and priorities
          * from the ClientHello.  Update the (pending) cipher spec as we do
@@ -825,6 +858,69 @@
             m1.extensions.add(maxFragLenExt);
         }
 
+        StatusRequestType statReqType = null;
+        StatusRequest statReqData = null;
+        if (staplingActive && !resumingSession) {
+            ExtensionType statusRespExt = ExtensionType.EXT_STATUS_REQUEST;
+
+            // Determine which type of stapling we are doing and assert the
+            // proper extension in the server hello.
+            // Favor status_request_v2 over status_request and ocsp_multi
+            // over ocsp.
+            // If multiple ocsp or ocsp_multi types exist, select the first
+            // instance of a given type
+            if (statReqExtV2 != null) {             // RFC 6961 stapling
+                statusRespExt = ExtensionType.EXT_STATUS_REQUEST_V2;
+                List<CertStatusReqItemV2> reqItems =
+                        statReqExtV2.getRequestItems();
+                int ocspIdx = -1;
+                int ocspMultiIdx = -1;
+                for (int pos = 0; pos < reqItems.size(); pos++) {
+                    CertStatusReqItemV2 item = reqItems.get(pos);
+                    if (ocspIdx < 0 && item.getType() ==
+                            StatusRequestType.OCSP) {
+                        ocspIdx = pos;
+                    } else if (ocspMultiIdx < 0 && item.getType() ==
+                            StatusRequestType.OCSP_MULTI) {
+                        ocspMultiIdx = pos;
+                    }
+                }
+                if (ocspMultiIdx >= 0) {
+                    statReqType = reqItems.get(ocspMultiIdx).getType();
+                    statReqData = reqItems.get(ocspMultiIdx).getRequest();
+                } else if (ocspIdx >= 0) {
+                    statReqType = reqItems.get(ocspIdx).getType();
+                    statReqData = reqItems.get(ocspIdx).getRequest();
+                } else {
+                    // Some unknown type.  We will not do stapling for
+                    // this connection since we cannot understand the
+                    // requested type.
+                    staplingActive = false;
+                }
+            } else {                                // RFC 6066 stapling
+                statReqType = StatusRequestType.OCSP;
+                statReqData = statReqExt.getRequest();
+            }
+
+            if (statReqType != null && statReqData != null) {
+                // Next, attempt to obtain status responses
+                StatusResponseManager statRespMgr =
+                        sslContext.getStatusResponseManager();
+                responseMap = statRespMgr.get(statReqType, statReqData, certs,
+                        statusRespTimeout, TimeUnit.MILLISECONDS);
+                if (!responseMap.isEmpty()) {
+                    // We now can safely assert status_request[_v2] in our
+                    // ServerHello, and know for certain that we can provide
+                    // responses back to this client for this connection.
+                    if (statusRespExt == ExtensionType.EXT_STATUS_REQUEST) {
+                        m1.extensions.add(new CertStatusReqExtension());
+                    } else if (statusRespExt == ExtensionType.EXT_STATUS_REQUEST_V2) {
+                        m1.extensions.add(new CertStatusReqListV2Extension());
+                    }
+                }
+            }
+        }
+
         if (debug != null && Debug.isOn("handshake")) {
             m1.print(System.out);
             System.out.println("Cipher suite:  " + session.getSuite());
@@ -886,6 +982,32 @@
             }
         }
 
+        /**
+         * The CertificateStatus message ... only if it is needed.
+         * This would only be needed if we've established that this handshake
+         * supports status stapling and there is at least one response to
+         * return to the client.
+         */
+        if (staplingActive && !responseMap.isEmpty()) {
+            try {
+                CertificateStatus csMsg = new CertificateStatus(statReqType,
+                        certs, responseMap);
+                if (debug != null && Debug.isOn("handshake")) {
+                    csMsg.print(System.out);
+                }
+                csMsg.write(output);
+                handshakeState.update(csMsg, resumingSession);
+                responseMap = null;
+            } catch (SSLException ssle) {
+                // We don't want the exception to be fatal, we just won't
+                // send the message if we fail on construction.
+                if (debug != null && Debug.isOn("handshake")) {
+                    System.out.println("Failed during CertificateStatus " +
+                            "construction: " + ssle);
+                }
+            }
+        }
+
         /*
          * THIRD, the ServerKeyExchange message ... iff it's needed.
          *
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/StatusRequest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+
+/*
+ * RFC 6066 defines the TLS extension,"status_request" (type 0x5),
+ * which allows the client to request that the server perform OCSP
+ * on the client's behalf.
+ *
+ * This class is an interface for multiple types of StatusRequests
+ * (e.g. OCSPStatusRequest).
+ */
+interface StatusRequest {
+
+    /**
+     * Obtain the length of the {@code StatusRequest} object in encoded form
+     *
+     * @return the length of the {@code StatusRequest} object in encoded form
+     */
+    int length();
+
+    /**
+     * Place the encoded {@code StatusRequest} bytes into the
+     *      {@code HandshakeOutputStream}
+     *
+     * @param s the target {@code HandshakeOutputStream}
+     *
+     * @throws IOException if any encoding error occurs
+     */
+    void send(HandshakeOutStream s) throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/StatusRequestType.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+final class StatusRequestType {
+
+    final int id;
+    final String name;
+    static List<StatusRequestType> knownTypes = new ArrayList<>(4);
+
+    private StatusRequestType(int id, String name) {
+        this.id = id;
+        this.name = name;
+    }
+
+    static StatusRequestType get(int id) {
+        for (StatusRequestType ext : knownTypes) {
+            if (ext.id == id) {
+                return ext;
+            }
+        }
+        return new StatusRequestType(id, "type_" + id);
+    }
+
+    private static StatusRequestType e(int id, String name) {
+        StatusRequestType ext = new StatusRequestType(id, name);
+        knownTypes.add(ext);
+        return ext;
+    }
+
+    @Override
+    public String toString() {
+        return (name == null || name.isEmpty()) ?
+                String.format("Unknown (0x%04X", id) : name;
+    }
+
+    // Status request types defined in RFC 6066 and 6961
+    final static StatusRequestType OCSP = e(0x01, "ocsp");
+    final static StatusRequestType OCSP_MULTI = e(0x02, "ocsp_multi");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/StatusResponseManager.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,669 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.security.AccessController;
+import java.security.cert.X509Certificate;
+import java.security.cert.Extension;
+import java.util.*;
+import java.util.concurrent.*;
+
+import sun.security.provider.certpath.CertId;
+import sun.security.provider.certpath.OCSP;
+import sun.security.provider.certpath.OCSPResponse;
+import sun.security.provider.certpath.ResponderId;
+import sun.security.util.Cache;
+import sun.security.x509.PKIXExtensions;
+import sun.security.x509.SerialNumber;
+import sun.security.action.GetBooleanAction;
+import sun.security.action.GetIntegerAction;
+import sun.security.action.GetPropertyAction;
+
+final class StatusResponseManager {
+    private static final int DEFAULT_CORE_THREADS = 8;
+    private static final int DEFAULT_CACHE_SIZE = 256;
+    private static final int DEFAULT_CACHE_LIFETIME = 3600;         // seconds
+    private static final Debug debug = Debug.getInstance("ssl");
+
+    private final ScheduledThreadPoolExecutor threadMgr;
+    private final Cache<CertId, ResponseCacheEntry> responseCache;
+    private final URI defaultResponder;
+    private final boolean respOverride;
+    private final int cacheCapacity;
+    private final int cacheLifetime;
+    private final boolean ignoreExtensions;
+
+    /**
+     * Create a StatusResponseManager with default parameters.
+     */
+    StatusResponseManager() {
+        int cap = AccessController.doPrivileged(
+                new GetIntegerAction("jdk.tls.stapling.cacheSize",
+                    DEFAULT_CACHE_SIZE));
+        cacheCapacity = cap > 0 ? cap : 0;
+
+        int life = AccessController.doPrivileged(
+                new GetIntegerAction("jdk.tls.stapling.cacheLifetime",
+                    DEFAULT_CACHE_LIFETIME));
+        cacheLifetime = life > 0 ? life : 0;
+
+        String uriStr = AccessController.doPrivileged(
+                new GetPropertyAction("jdk.tls.stapling.responderURI"));
+        URI tmpURI;
+        try {
+            tmpURI = ((uriStr != null && !uriStr.isEmpty()) ?
+                    new URI(uriStr) : null);
+        } catch (URISyntaxException urise) {
+            tmpURI = null;
+        }
+        defaultResponder = tmpURI;
+
+        respOverride = AccessController.doPrivileged(
+                new GetBooleanAction("jdk.tls.stapling.responderOverride"));
+        ignoreExtensions = AccessController.doPrivileged(
+                new GetBooleanAction("jdk.tls.stapling.ignoreExtensions"));
+
+        threadMgr = new ScheduledThreadPoolExecutor(DEFAULT_CORE_THREADS,
+                new ThreadFactory() {
+            @Override
+            public Thread newThread(Runnable r) {
+                Thread t = Executors.defaultThreadFactory().newThread(r);
+                t.setDaemon(true);
+                return t;
+            }
+        });
+        threadMgr.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
+        threadMgr.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
+        threadMgr.setKeepAliveTime(5000, TimeUnit.MILLISECONDS);
+        responseCache = Cache.newSoftMemoryCache(cacheCapacity, cacheLifetime);
+    }
+
+    /**
+     * Get the current cache lifetime setting
+     *
+     * @return the current cache lifetime value
+     */
+    int getCacheLifetime() {
+        return cacheLifetime;
+    }
+
+    /**
+     * Get the current maximum cache size.
+     *
+     * @return the current maximum cache size
+     */
+    int getCacheCapacity() {
+        return cacheCapacity;
+    }
+
+    /**
+     * Get the default OCSP responder URI, if previously set.
+     *
+     * @return the current default OCSP responder URI, or {@code null} if
+     *      it has not been set.
+     */
+    URI getDefaultResponder() {
+        return defaultResponder;
+    }
+
+    /**
+     * Get the URI override setting
+     *
+     * @return {@code true} if URI override has been set, {@code false}
+     * otherwise.
+     */
+    boolean getURIOverride() {
+        return respOverride;
+    }
+
+    /**
+     * Get the ignore extensions setting.
+     *
+     * @return {@code true} if the {@code StatusResponseManager} will not
+     * pass OCSP Extensions in the TLS {@code status_request[_v2]} extensions,
+     * {@code false} if extensions will be passed (the default).
+     */
+    boolean getIgnoreExtensions() {
+        return ignoreExtensions;
+    }
+
+    /**
+     * Clear the status response cache
+     */
+    void clear() {
+        debugLog("Clearing response cache");
+        responseCache.clear();
+    }
+
+    /**
+     * Returns the number of currently valid objects in the response cache.
+     *
+     * @return the number of valid objects in the response cache.
+     */
+    int size() {
+        return responseCache.size();
+    }
+
+    /**
+     * Obtain the URI use by the {@code StatusResponseManager} during lookups.
+     * This method takes into account not only the AIA extension from a
+     * certificate to be checked, but also any default URI and possible
+     * override settings for the response manager.
+     *
+     * @param cert the subject to get the responder URI from
+     *
+     * @return a {@code URI} containing the address to the OCSP responder, or
+     *      {@code null} if no AIA extension exists in the certificate and no
+     *      default responder has been configured.
+     *
+     * @throws NullPointerException if {@code cert} is {@code null}.
+     */
+    URI getURI(X509Certificate cert) {
+        Objects.requireNonNull(cert);
+
+        if (cert.getExtensionValue(
+                PKIXExtensions.OCSPNoCheck_Id.toString()) != null) {
+            debugLog("OCSP NoCheck extension found.  OCSP will be skipped");
+            return null;
+        } else if (defaultResponder != null && respOverride) {
+            debugLog("Responder override: URI is " + defaultResponder);
+            return defaultResponder;
+        } else {
+            URI certURI = OCSP.getResponderURI(cert);
+            return (certURI != null ? certURI : defaultResponder);
+        }
+    }
+
+    /**
+     * Shutdown the thread pool
+     */
+    void shutdown() {
+        debugLog("Shutting down " + threadMgr.getActiveCount() +
+                " active threads");
+        threadMgr.shutdown();
+    }
+
+    /**
+     * Get a list of responses for a chain of certificates.
+     * This will find OCSP responses from the cache, or failing that, directly
+     * contact the OCSP responder.  It is assumed that the certificates in
+     * the provided chain are in their proper order (from end-entity to
+     * trust anchor).
+     *
+     * @param type the type of request being made of the
+     *      {@code StatusResponseManager}
+     * @param request the {@code StatusRequest} from the status_request or
+     *      status_request_v2 ClientHello extension.  A value of {@code null}
+     *      is interpreted as providing no responder IDs or extensions.
+     * @param chain an array of 2 or more certificates.  Each certificate must
+     *      be issued by the next certificate in the chain.
+     * @param delay the number of time units to delay before returning
+     *      responses.
+     * @param unit the unit of time applied to the {@code delay} parameter
+     *
+     * @return an unmodifiable {@code Map} containing the certificate and
+     *      its usually
+     *
+     * @throws SSLHandshakeException if an unsupported {@code StatusRequest}
+     *      is provided.
+     */
+    Map<X509Certificate, byte[]> get(StatusRequestType type,
+            StatusRequest request, X509Certificate[] chain, long delay,
+            TimeUnit unit) {
+        Map<X509Certificate, byte[]> responseMap = new HashMap<>();
+        List<OCSPFetchCall> requestList = new ArrayList<>();
+
+        debugLog("Beginning check: Type = " + type + ", Chain length = " +
+                chain.length);
+
+        // It is assumed that the caller has ordered the certs in the chain
+        // in the proper order (each certificate is issued by the next entry
+        // in the provided chain).
+        if (chain.length < 2) {
+            return Collections.emptyMap();
+        }
+
+        if (type == StatusRequestType.OCSP) {
+            try {
+                // For type OCSP, we only check the end-entity certificate
+                OCSPStatusRequest ocspReq = (OCSPStatusRequest)request;
+                CertId cid = new CertId(chain[1],
+                        new SerialNumber(chain[0].getSerialNumber()));
+                ResponseCacheEntry cacheEntry = getFromCache(cid, ocspReq);
+                if (cacheEntry != null) {
+                    responseMap.put(chain[0], cacheEntry.ocspBytes);
+                } else {
+                    StatusInfo sInfo = new StatusInfo(chain[0], cid);
+                    requestList.add(new OCSPFetchCall(sInfo, ocspReq));
+                }
+            } catch (IOException exc) {
+                debugLog("Exception during CertId creation: " + exc);
+            }
+        } else if (type == StatusRequestType.OCSP_MULTI) {
+            // For type OCSP_MULTI, we check every cert in the chain that
+            // has a direct issuer at the next index.  We won't have an issuer
+            // certificate for the last certificate in the chain and will
+            // not be able to create a CertId because of that.
+            OCSPStatusRequest ocspReq = (OCSPStatusRequest)request;
+            int ctr;
+            for (ctr = 0; ctr < chain.length - 1; ctr++) {
+                try {
+                    // The cert at "ctr" is the subject cert, "ctr + 1" is the
+                    // issuer certificate.
+                    CertId cid = new CertId(chain[ctr + 1],
+                            new SerialNumber(chain[ctr].getSerialNumber()));
+                    ResponseCacheEntry cacheEntry = getFromCache(cid, ocspReq);
+                    if (cacheEntry != null) {
+                        responseMap.put(chain[ctr], cacheEntry.ocspBytes);
+                    } else {
+                        StatusInfo sInfo = new StatusInfo(chain[ctr], cid);
+                        requestList.add(new OCSPFetchCall(sInfo, ocspReq));
+                    }
+                } catch (IOException exc) {
+                    debugLog("Exception during CertId creation: " + exc);
+                }
+            }
+        } else {
+            debugLog("Unsupported status request type: " + type);
+        }
+
+        // If we were able to create one or more Fetches, go and run all
+        // of them in separate threads.  For all the threads that completed
+        // in the allotted time, put those status responses into the returned
+        // Map.
+        if (!requestList.isEmpty()) {
+            try {
+                // Set a bunch of threads to go do the fetching
+                List<Future<StatusInfo>> resultList =
+                        threadMgr.invokeAll(requestList, delay, unit);
+
+                // Go through the Futures and from any non-cancelled task,
+                // get the bytes and attach them to the responseMap.
+                for (Future<StatusInfo> task : resultList) {
+                    if (task.isDone()) {
+                        if (!task.isCancelled()) {
+                            StatusInfo info = task.get();
+                            if (info != null && info.responseData != null) {
+                                responseMap.put(info.cert,
+                                        info.responseData.ocspBytes);
+                            } else {
+                                debugLog("Completed task had no response data");
+                            }
+                        } else {
+                            debugLog("Found cancelled task");
+                        }
+                    }
+                }
+            } catch (InterruptedException | ExecutionException exc) {
+                // Not sure what else to do here
+                debugLog("Exception when getting data: " + exc);
+            }
+        }
+
+        return Collections.unmodifiableMap(responseMap);
+    }
+
+    /**
+     * Check the cache for a given {@code CertId}.
+     *
+     * @param cid the CertId of the response to look up
+     * @param ocspRequest the OCSP request structure sent by the client
+     *      in the TLS status_request[_v2] hello extension.
+     *
+     * @return the {@code ResponseCacheEntry} for a specific CertId, or
+     *      {@code null} if it is not found or a nonce extension has been
+     *      requested by the caller.
+     */
+    private ResponseCacheEntry getFromCache(CertId cid,
+            OCSPStatusRequest ocspRequest) {
+        // Determine if the nonce extension is present in the request.  If
+        // so, then do not attempt to retrieve the response from the cache.
+        for (Extension ext : ocspRequest.getExtensions()) {
+            if (ext.getId().equals(PKIXExtensions.OCSPNonce_Id.toString())) {
+                debugLog("Nonce extension found, skipping cache check");
+                return null;
+            }
+        }
+
+        ResponseCacheEntry respEntry = responseCache.get(cid);
+
+        // If the response entry has a nextUpdate and it has expired
+        // before the cache expiration, purge it from the cache
+        // and do not return it as a cache hit.
+        if (respEntry != null && respEntry.nextUpdate != null &&
+                respEntry.nextUpdate.before(new Date())) {
+            debugLog("nextUpdate threshold exceeded, purging from cache");
+            respEntry = null;
+        }
+
+        debugLog("Check cache for SN" + cid.getSerialNumber() + ": " +
+                (respEntry != null ? "HIT" : "MISS"));
+        return respEntry;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder("StatusResponseManager: ");
+
+        sb.append("Core threads: ").append(threadMgr.getCorePoolSize());
+        sb.append(", Cache timeout: ");
+        if (cacheLifetime > 0) {
+            sb.append(cacheLifetime).append(" seconds");
+        } else {
+            sb.append(" indefinite");
+        }
+
+        sb.append(", Cache MaxSize: ");
+        if (cacheCapacity > 0) {
+            sb.append(cacheCapacity).append(" items");
+        } else {
+            sb.append(" unbounded");
+        }
+
+        sb.append(", Default URI: ");
+        if (defaultResponder != null) {
+            sb.append(defaultResponder);
+        } else {
+            sb.append("NONE");
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * Log messages through the SSL Debug facility.
+     *
+     * @param message the message to be displayed
+     */
+    static void debugLog(String message) {
+        if (debug != null && Debug.isOn("respmgr")) {
+            StringBuilder sb = new StringBuilder();
+            sb.append("[").append(Thread.currentThread().getName());
+            sb.append("] ").append(message);
+            System.out.println(sb.toString());
+        }
+    }
+
+    /**
+     * Inner class used to group request and response data.
+     */
+    class StatusInfo {
+        final X509Certificate cert;
+        final CertId cid;
+        final URI responder;
+        ResponseCacheEntry responseData;
+
+        /**
+         * Create a StatusInfo object from certificate data.
+         *
+         * @param subjectCert the certificate to be checked for revocation
+         * @param issuerCert the issuer of the {@code subjectCert}
+         *
+         * @throws IOException if CertId creation from the certificates fails
+         */
+        StatusInfo(X509Certificate subjectCert, X509Certificate issuerCert)
+                throws IOException {
+            this(subjectCert, new CertId(issuerCert,
+                    new SerialNumber(subjectCert.getSerialNumber())));
+        }
+
+        /**
+         * Create a StatusInfo object from an existing subject certificate
+         * and its corresponding CertId.
+         *
+         * @param subjectCert the certificate to be checked for revocation
+         * @param cid the CertId for {@code subjectCert}
+         */
+        StatusInfo(X509Certificate subjectCert, CertId certId) {
+            cert = subjectCert;
+            cid = certId;
+            responder = getURI(cert);
+            responseData = null;
+        }
+
+        /**
+         * Copy constructor (used primarily for rescheduling).
+         * This will do a member-wise copy with the exception of the
+         * responseData and extensions fields, which should not persist
+         * in a rescheduled fetch.
+         *
+         * @param orig the original {@code StatusInfo}
+         */
+        StatusInfo(StatusInfo orig) {
+            this.cert = orig.cert;
+            this.cid = orig.cid;
+            this.responder = orig.responder;
+            this.responseData = null;
+        }
+
+        /**
+         * Return a String representation of the {@code StatusInfo}
+         *
+         * @return a {@code String} representation of this object
+         */
+        @Override
+        public String toString() {
+            StringBuilder sb = new StringBuilder("StatusInfo:");
+            sb.append("\n\tCert: ").append(this.cert.getSubjectX500Principal());
+            sb.append("\n\tSerial: ").append(this.cert.getSerialNumber());
+            sb.append("\n\tResponder: ").append(this.responder);
+            sb.append("\n\tResponse data: ").append(this.responseData != null ?
+                    (this.responseData.ocspBytes.length + " bytes") : "<NULL>");
+            return sb.toString();
+        }
+    }
+
+    /**
+     * Static nested class used as the data kept in the response cache.
+     */
+    static class ResponseCacheEntry {
+        final OCSPResponse.ResponseStatus status;
+        final byte[] ocspBytes;
+        final Date nextUpdate;
+        final OCSPResponse.SingleResponse singleResp;
+        final ResponderId respId;
+
+        /**
+         * Create a new cache entry from the raw bytes of the response
+         *
+         * @param responseBytes the DER encoding for the OCSP response
+         *
+         * @throws IOException if an {@code OCSPResponse} cannot be created from
+         *      the encoded bytes.
+         */
+        ResponseCacheEntry(byte[] responseBytes, CertId cid)
+                throws IOException {
+            Objects.requireNonNull(responseBytes,
+                    "Non-null responseBytes required");
+            Objects.requireNonNull(cid, "Non-null Cert ID required");
+
+            ocspBytes = responseBytes.clone();
+            OCSPResponse oResp = new OCSPResponse(ocspBytes);
+            status = oResp.getResponseStatus();
+            respId = oResp.getResponderId();
+            singleResp = oResp.getSingleResponse(cid);
+            if (status == OCSPResponse.ResponseStatus.SUCCESSFUL) {
+                if (singleResp != null) {
+                    // Pull out the nextUpdate field in advance because the
+                    // Date is cloned.
+                    nextUpdate = singleResp.getNextUpdate();
+                } else {
+                    throw new IOException("Unable to find SingleResponse for " +
+                            "SN " + cid.getSerialNumber());
+                }
+            } else {
+                nextUpdate = null;
+            }
+        }
+    }
+
+    /**
+     * Inner Callable class that does the actual work of looking up OCSP
+     * responses, first looking at the cache and doing OCSP requests if
+     * a cache miss occurs.
+     */
+    class OCSPFetchCall implements Callable<StatusInfo> {
+        StatusInfo statInfo;
+        OCSPStatusRequest ocspRequest;
+        List<Extension> extensions;
+        List<ResponderId> responderIds;
+
+        /**
+         * A constructor that builds the OCSPFetchCall from the provided
+         * StatusInfo and information from the status_request[_v2] extension.
+         *
+         * @param info the {@code StatusInfo} containing the subject
+         * certificate, CertId, and other supplemental info.
+         * @param request the {@code OCSPStatusRequest} containing any
+         * responder IDs and extensions.
+         */
+        public OCSPFetchCall(StatusInfo info, OCSPStatusRequest request) {
+            statInfo = Objects.requireNonNull(info,
+                    "Null StatusInfo not allowed");
+            ocspRequest = Objects.requireNonNull(request,
+                    "Null OCSPStatusRequest not allowed");
+            extensions = ocspRequest.getExtensions();
+            responderIds = ocspRequest.getResponderIds();
+        }
+
+        /**
+         * Get an OCSP response, either from the cache or from a responder.
+         *
+         * @return The StatusInfo object passed into the {@code OCSPFetchCall}
+         * constructor, with the {@code responseData} field filled in with the
+         * response or {@code null} if no response can be obtained.
+         */
+        @Override
+        public StatusInfo call() {
+            debugLog("Starting fetch for SN " + statInfo.cid.getSerialNumber());
+            try {
+                ResponseCacheEntry cacheEntry;
+                List<Extension> extsToSend;
+
+                if (statInfo.responder == null) {
+                    // If we have no URI then there's nothing to do but return
+                    debugLog("Null URI detected, OCSP fetch aborted.");
+                    return statInfo;
+                } else {
+                    debugLog("Attempting fetch from " + statInfo.responder);
+                }
+
+                // If the StatusResponseManager has been configured to not
+                // forward extensions, then set extensions to an empty list.
+                // We will forward the extensions unless one of two conditions
+                // occur: (1) The jdk.tls.stapling.ignoreExtensions property is
+                // true or (2) There is a non-empty ResponderId list.
+                // ResponderId selection is a feature that will be
+                // supported in the future.
+                extsToSend = (ignoreExtensions || !responderIds.isEmpty()) ?
+                        Collections.emptyList() : extensions;
+
+                byte[] respBytes = OCSP.getOCSPBytes(
+                        Collections.singletonList(statInfo.cid),
+                        statInfo.responder, extsToSend);
+
+                if (respBytes != null) {
+                    // Place the data into the response cache
+                    cacheEntry = new ResponseCacheEntry(respBytes,
+                            statInfo.cid);
+
+                    // Get the response status and act on it appropriately
+                    debugLog("OCSP Status: " + cacheEntry.status +
+                            " (" + respBytes.length + " bytes)");
+                    if (cacheEntry.status ==
+                            OCSPResponse.ResponseStatus.SUCCESSFUL) {
+                        // Set the response in the returned StatusInfo
+                        statInfo.responseData = cacheEntry;
+
+                        // Add the response to the cache (if applicable)
+                        addToCache(statInfo.cid, cacheEntry);
+                    }
+                } else {
+                    debugLog("No data returned from OCSP Responder");
+                }
+            } catch (IOException ioe) {
+                debugLog("Caught exception: " + ioe);
+            }
+
+            return statInfo;
+        }
+
+        /**
+         * Add a response to the cache.
+         *
+         * @param certId The {@code CertId} for the OCSP response
+         * @param entry A cache entry containing the response bytes and
+         *      the {@code OCSPResponse} built from those bytes.
+         */
+        private void addToCache(CertId certId, ResponseCacheEntry entry) {
+            // If no cache lifetime has been set on entries then
+            // don't cache this response if there is no nextUpdate field
+            if (entry.nextUpdate == null && cacheLifetime == 0) {
+                debugLog("Not caching this OCSP response");
+            } else {
+                responseCache.put(certId, entry);
+                debugLog("Added response for SN " + certId.getSerialNumber() +
+                        " to cache");
+            }
+        }
+
+        /**
+         * Determine the delay to use when scheduling the task that will
+         * update the OCSP response.  This is the shorter time between the
+         * cache lifetime and the nextUpdate.  If no nextUpdate is present in
+         * the response, then only the cache lifetime is used.
+         * If cache timeouts are disabled (a zero value) and there's no
+         * nextUpdate, then the entry is not cached and no rescheduling will
+         * take place.
+         *
+         * @param nextUpdate a {@code Date} object corresponding to the
+         *      next update time from a SingleResponse.
+         *
+         * @return the number of seconds of delay before the next fetch
+         *      should be executed.  A zero value means that the fetch
+         *      should happen immediately, while a value less than zero
+         *      indicates no rescheduling should be done.
+         */
+        private long getNextTaskDelay(Date nextUpdate) {
+            long delaySec;
+            int lifetime = getCacheLifetime();
+
+            if (nextUpdate != null) {
+                long nuDiffSec = (nextUpdate.getTime() -
+                        System.currentTimeMillis()) / 1000;
+                delaySec = lifetime > 0 ? Long.min(nuDiffSec, lifetime) :
+                        nuDiffSec;
+            } else {
+                delaySec = lifetime > 0 ? lifetime : -1;
+            }
+
+            return delaySec;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/UnknownStatusRequest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+
+final class UnknownStatusRequest implements StatusRequest  {
+
+    private final byte[] data;
+
+    UnknownStatusRequest(HandshakeInStream s, int len) throws IOException {
+        data = new byte[len];
+        if (len > 0) {
+            s.read(data);
+        }
+    }
+
+    UnknownStatusRequest(byte[] requestBytes) {
+        data = requestBytes;
+    }
+
+    @Override
+    public int length() {
+        return data.length;
+    }
+
+    @Override
+    public void send(HandshakeOutStream s) throws IOException {
+        // A raw write of the data
+        s.write(data);
+    }
+
+    @Override
+    public String toString() {
+        return "Unsupported StatusRequest, data: " +
+            Debug.toString(data);
+    }
+}
--- a/jdk/src/java.base/share/classes/sun/security/ssl/X509TrustManagerImpl.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/X509TrustManagerImpl.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -184,6 +184,7 @@
         Validator v = checkTrustedInit(chain, authType, isClient);
 
         AlgorithmConstraints constraints = null;
+        List<byte[]> responseList = Collections.emptyList();
         if ((socket != null) && socket.isConnected() &&
                                         (socket instanceof SSLSocket)) {
 
@@ -195,7 +196,7 @@
 
             // check endpoint identity
             String identityAlg = sslSocket.getSSLParameters().
-                                        getEndpointIdentificationAlgorithm();
+                    getEndpointIdentificationAlgorithm();
             if (identityAlg != null && identityAlg.length() != 0) {
                 checkIdentity(session, chain[0], identityAlg, isClient,
                         getRequestedServerNames(socket));
@@ -204,7 +205,7 @@
             // create the algorithm constraints
             ProtocolVersion protocolVersion =
                 ProtocolVersion.valueOf(session.getProtocol());
-            if (protocolVersion.useTLS12PlusSpec()) {
+            if (protocolVersion.v >= ProtocolVersion.TLS12.v) {
                 if (session instanceof ExtendedSSLSession) {
                     ExtendedSSLSession extSession =
                                     (ExtendedSSLSession)session;
@@ -220,13 +221,21 @@
             } else {
                 constraints = new SSLAlgorithmConstraints(sslSocket, false);
             }
+
+            // Grab any stapled OCSP responses for use in validation
+            if (session instanceof ExtendedSSLSession) {
+                responseList =
+                        ((ExtendedSSLSession)session).getStatusResponses();
+            }
         }
 
         X509Certificate[] trustedChain = null;
         if (isClient) {
-            trustedChain = validate(v, chain, constraints, null);
+            trustedChain = validate(v, chain, Collections.emptyList(),
+                    constraints, null);
         } else {
-            trustedChain = validate(v, chain, constraints, authType);
+            trustedChain = validate(v, chain, responseList, constraints,
+                    authType);
         }
         if (debug != null && Debug.isOn("trustmanager")) {
             System.out.println("Found trusted certificate:");
@@ -239,6 +248,7 @@
         Validator v = checkTrustedInit(chain, authType, isClient);
 
         AlgorithmConstraints constraints = null;
+        List<byte[]> responseList = Collections.emptyList();
         if (engine != null) {
             SSLSession session = engine.getHandshakeSession();
             if (session == null) {
@@ -247,7 +257,7 @@
 
             // check endpoint identity
             String identityAlg = engine.getSSLParameters().
-                                        getEndpointIdentificationAlgorithm();
+                    getEndpointIdentificationAlgorithm();
             if (identityAlg != null && identityAlg.length() != 0) {
                 checkIdentity(session, chain[0], identityAlg, isClient,
                         getRequestedServerNames(engine));
@@ -256,7 +266,7 @@
             // create the algorithm constraints
             ProtocolVersion protocolVersion =
                 ProtocolVersion.valueOf(session.getProtocol());
-            if (protocolVersion.useTLS12PlusSpec()) {
+            if (protocolVersion.v >= ProtocolVersion.TLS12.v) {
                 if (session instanceof ExtendedSSLSession) {
                     ExtendedSSLSession extSession =
                                     (ExtendedSSLSession)session;
@@ -272,13 +282,21 @@
             } else {
                 constraints = new SSLAlgorithmConstraints(engine, false);
             }
+
+            // Grab any stapled OCSP responses for use in validation
+            if (session instanceof ExtendedSSLSession) {
+                responseList =
+                        ((ExtendedSSLSession)session).getStatusResponses();
+            }
         }
 
         X509Certificate[] trustedChain = null;
         if (isClient) {
-            trustedChain = validate(v, chain, constraints, null);
+            trustedChain = validate(v, chain, Collections.emptyList(),
+                    constraints, null);
         } else {
-            trustedChain = validate(v, chain, constraints, authType);
+            trustedChain = validate(v, chain, responseList, constraints,
+                    authType);
         }
         if (debug != null && Debug.isOn("trustmanager")) {
             System.out.println("Found trusted certificate:");
@@ -317,11 +335,12 @@
     }
 
     private static X509Certificate[] validate(Validator v,
-            X509Certificate[] chain, AlgorithmConstraints constraints,
-            String authType) throws CertificateException {
+            X509Certificate[] chain, List<byte[]> responseList,
+            AlgorithmConstraints constraints, String authType)
+            throws CertificateException {
         Object o = JsseJce.beginFipsProvider();
         try {
-            return v.validate(chain, null, constraints, authType);
+            return v.validate(chain, null, responseList, constraints, authType);
         } finally {
             JsseJce.endFipsProvider(o);
         }
--- a/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -186,6 +186,7 @@
     @Override
     X509Certificate[] engineValidate(X509Certificate[] chain,
             Collection<X509Certificate> otherCerts,
+            List<byte[]> responseList,
             AlgorithmConstraints constraints,
             Object parameter) throws CertificateException {
         if ((chain == null) || (chain.length == 0)) {
@@ -193,7 +194,7 @@
                 ("null or zero-length certificate chain");
         }
 
-        // add  new algorithm constraints checker
+        // add new algorithm constraints checker
         PKIXBuilderParameters pkixParameters =
                     (PKIXBuilderParameters) parameterTemplate.clone();
         AlgorithmChecker algorithmChecker = null;
@@ -202,6 +203,11 @@
             pkixParameters.addCertPathChecker(algorithmChecker);
         }
 
+        // attach it to the PKIXBuilderParameters.
+        if (!responseList.isEmpty()) {
+            addResponses(pkixParameters, chain, responseList);
+        }
+
         // check that chain is in correct order and check if chain contains
         // trust anchor
         X500Principal prevIssuer = null;
@@ -369,4 +375,70 @@
                 ("PKIX path building failed: " + e.toString(), e);
         }
     }
+
+    /**
+     * For OCSP Stapling, add responses that came in during the handshake
+     * into a {@code PKIXRevocationChecker} so we can evaluate them.
+     *
+     * @param pkixParams the pkixParameters object that will be used in
+     * path validation.
+     * @param chain the chain of certificates to verify
+     * @param responseList a {@code List} of zero or more byte arrays, each
+     * one being a DER-encoded OCSP response (per RFC 6960).  Entries
+     * in the List must match the order of the certificates in the
+     * chain parameter.
+     */
+    private static void addResponses(PKIXBuilderParameters pkixParams,
+            X509Certificate[] chain, List<byte[]> responseList) {
+
+        if (pkixParams.isRevocationEnabled()) {
+            try {
+                // Make a modifiable copy of the CertPathChecker list
+                PKIXRevocationChecker revChecker = null;
+                List<PKIXCertPathChecker> checkerList =
+                        new ArrayList<>(pkixParams.getCertPathCheckers());
+
+                // Find the first PKIXRevocationChecker in the list
+                for (PKIXCertPathChecker checker : checkerList) {
+                    if (checker instanceof PKIXRevocationChecker) {
+                        revChecker = (PKIXRevocationChecker)checker;
+                        break;
+                    }
+                }
+
+                // If we still haven't found one, make one
+                if (revChecker == null) {
+                    revChecker = (PKIXRevocationChecker)CertPathValidator.
+                            getInstance("PKIX").getRevocationChecker();
+                    checkerList.add(revChecker);
+                }
+
+                // Each response in the list should be in parallel with
+                // the certificate list.  If there is a zero-length response
+                // treat it as being absent.  If the user has provided their
+                // own PKIXRevocationChecker with pre-populated responses, do
+                // not overwrite them with the ones from the handshake.
+                Map<X509Certificate, byte[]> responseMap =
+                        revChecker.getOcspResponses();
+                int limit = Integer.min(chain.length, responseList.size());
+                for (int idx = 0; idx < limit; idx++) {
+                    byte[] respBytes = responseList.get(idx);
+                    if (respBytes != null && respBytes.length > 0 &&
+                            !responseMap.containsKey(chain[idx])) {
+                        responseMap.put(chain[idx], respBytes);
+                    }
+                }
+
+                // Add the responses and push it all back into the
+                // PKIXBuilderParameters
+                revChecker.setOcspResponses(responseMap);
+                pkixParams.setCertPathCheckers(checkerList);
+            } catch (NoSuchAlgorithmException exc) {
+                // This should not occur, but if it does happen then
+                // stapled OCSP responses won't be part of revocation checking.
+                // Clients can still fall back to other means of revocation
+                // checking.
+            }
+        }
+    }
 }
--- a/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/validator/SimpleValidator.java	Mon Aug 10 14:05:37 2015 +0300
@@ -122,6 +122,7 @@
     @Override
     X509Certificate[] engineValidate(X509Certificate[] chain,
             Collection<X509Certificate> otherCerts,
+            List<byte[]> responseList,
             AlgorithmConstraints constraints,
             Object parameter) throws CertificateException {
         if ((chain == null) || (chain.length == 0)) {
--- a/jdk/src/java.base/share/classes/sun/security/validator/Validator.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/validator/Validator.java	Mon Aug 10 14:05:37 2015 +0300
@@ -235,7 +235,8 @@
     public final X509Certificate[] validate(X509Certificate[] chain,
             Collection<X509Certificate> otherCerts, Object parameter)
             throws CertificateException {
-        return validate(chain, otherCerts, null, parameter);
+        return validate(chain, otherCerts, Collections.emptyList(), null,
+                parameter);
     }
 
     /**
@@ -244,6 +245,13 @@
      * @param chain the target certificate chain
      * @param otherCerts a Collection of additional X509Certificates that
      *        could be helpful for path building (or null)
+     * @param responseList a List of zero or more byte arrays, each
+     *        one being a DER-encoded OCSP response (per RFC 6960).  Entries
+     *        in the List must match the order of the certificates in the
+     *        chain parameter.  It is possible that fewer responses may be
+     *        in the list than are elements in {@code chain} and a missing
+     *        response for a matching element in {@code chain} can be
+     *        represented with a zero-length byte array.
      * @param constraints algorithm constraints for certification path
      *        processing
      * @param parameter an additional parameter with variant specific meaning.
@@ -257,9 +265,11 @@
      */
     public final X509Certificate[] validate(X509Certificate[] chain,
                 Collection<X509Certificate> otherCerts,
+                List<byte[]> responseList,
                 AlgorithmConstraints constraints,
                 Object parameter) throws CertificateException {
-        chain = engineValidate(chain, otherCerts, constraints, parameter);
+        chain = engineValidate(chain, otherCerts, responseList, constraints,
+                parameter);
 
         // omit EE extension check if EE cert is also trust anchor
         if (chain.length > 1) {
@@ -280,6 +290,7 @@
 
     abstract X509Certificate[] engineValidate(X509Certificate[] chain,
                 Collection<X509Certificate> otherCerts,
+                List<byte[]> responseList,
                 AlgorithmConstraints constraints,
                 Object parameter) throws CertificateException;
 
--- a/jdk/src/java.base/share/classes/sun/security/x509/PKIXExtensions.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/PKIXExtensions.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -77,6 +77,11 @@
     private static final int[] OCSPNoCheck_data = { 1, 3, 6, 1, 5, 5, 7,
                                                     48, 1, 5};
 
+    // Additional extensions under the PKIX arc that are not necessarily
+    // used in X.509 Certificates or CRLs.
+    private static final int OCSPNonce_data [] = { 1, 3, 6, 1, 5, 5, 7,
+                                                  48, 1, 2};
+
     /**
      * Identifies the particular public key used to sign the certificate.
      */
@@ -104,18 +109,20 @@
     public static final ObjectIdentifier CertificatePolicies_Id;
 
     /**
-     * Lists pairs of objectidentifiers of policies considered equivalent by the
-     * issuing CA to the subject CA.
+     * Lists pairs of object identifiers of policies considered equivalent by
+     * the issuing CA to the subject CA.
      */
     public static final ObjectIdentifier PolicyMappings_Id;
 
     /**
-     * Allows additional identities to be bound to the subject of the certificate.
+     * Allows additional identities to be bound to the subject of the
+     * certificate.
      */
     public static final ObjectIdentifier SubjectAlternativeName_Id;
 
     /**
-     * Allows additional identities to be associated with the certificate issuer.
+     * Allows additional identities to be associated with the certificate
+     * issuer.
      */
     public static final ObjectIdentifier IssuerAlternativeName_Id;
 
@@ -224,6 +231,12 @@
      */
     public static final ObjectIdentifier OCSPNoCheck_Id;
 
+    /**
+     * This extension is used to provide nonce data for OCSP requests
+     * or responses.
+     */
+    public static final ObjectIdentifier OCSPNonce_Id;
+
     static {
         AuthorityKey_Id = ObjectIdentifier.newInternal(AuthorityKey_data);
         SubjectKey_Id   = ObjectIdentifier.newInternal(SubjectKey_data);
@@ -266,5 +279,6 @@
             ObjectIdentifier.newInternal(SubjectInfoAccess_data);
         FreshestCRL_Id = ObjectIdentifier.newInternal(FreshestCRL_data);
         OCSPNoCheck_Id = ObjectIdentifier.newInternal(OCSPNoCheck_data);
+        OCSPNonce_Id = ObjectIdentifier.newInternal(OCSPNonce_data);
     }
 }
--- a/jdk/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java	Mon Aug 10 14:05:37 2015 +0300
@@ -80,7 +80,17 @@
         LocaleProviderAdapter adapter = LocaleProviderAdapter.getAdapter(TimeZoneNameProvider.class, locale);
         TimeZoneNameProvider provider = adapter.getTimeZoneNameProvider();
         if (provider instanceof TimeZoneNameProviderImpl) {
-            return ((TimeZoneNameProviderImpl)provider).getZoneStrings(locale);
+            String[][] zoneStrings = ((TimeZoneNameProviderImpl)provider).getZoneStrings(locale);
+
+            if (zoneStrings.length == 0 && locale.equals(Locale.ROOT)) {
+                // Unlike other *Name provider, zoneStrings search won't do the fallback
+                // name search. If the ResourceBundle found for the root locale contains no
+                // zoneStrings, just use the one for English, assuming English bundle
+                // contains all the tzids and their names.
+                zoneStrings= getZoneStrings(Locale.ENGLISH);
+            }
+
+            return zoneStrings;
         }
 
         // Performs per-ID retrieval.
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,34 +31,23 @@
 import java.security.PrivilegedAction;
 
 /**
- * File type detector that uses the GNOME I/O library or the deprecated
- * GNOME VFS to guess the MIME type of a file.
+ * File type detector that uses the GNOME I/O library to guess the
+ * MIME type of a file.
  */
 
 public class GnomeFileTypeDetector
     extends AbstractFileTypeDetector
 {
-    private static final String GNOME_VFS_MIME_TYPE_UNKNOWN =
-        "application/octet-stream";
-
-    // true if GIO available
+    // true if GIO is available
     private final boolean gioAvailable;
 
-    // true if GNOME VFS available and GIO is not available
-    private final boolean gnomeVfsAvailable;
-
     public GnomeFileTypeDetector() {
         gioAvailable = initializeGio();
-        if (gioAvailable) {
-            gnomeVfsAvailable = false;
-        } else {
-            gnomeVfsAvailable = initializeGnomeVfs();
-        }
     }
 
     @Override
     public String implProbeContentType(Path obj) throws IOException {
-        if (!gioAvailable && !gnomeVfsAvailable)
+        if (!gioAvailable)
             return null;
         if (!(obj instanceof UnixPath))
             return null;
@@ -66,18 +55,10 @@
         UnixPath path = (UnixPath)obj;
         NativeBuffer buffer = NativeBuffers.asNativeBuffer(path.getByteArrayForSysCalls());
         try {
-            if (gioAvailable) {
-                // GIO may access file so need permission check
-                path.checkRead();
-                byte[] type = probeUsingGio(buffer.address());
-                return (type == null) ? null : Util.toString(type);
-            } else {
-                byte[] type = probeUsingGnomeVfs(buffer.address());
-                if (type == null)
-                    return null;
-                String s = Util.toString(type);
-                return s.equals(GNOME_VFS_MIME_TYPE_UNKNOWN) ? null : s;
-            }
+            // GIO may access file so need permission check
+            path.checkRead();
+            byte[] type = probeGio(buffer.address());
+            return (type == null) ? null : Util.toString(type);
         } finally {
             buffer.release();
         }
@@ -86,11 +67,7 @@
 
     // GIO
     private static native boolean initializeGio();
-    private static native byte[] probeUsingGio(long pathAddress);
-
-    // GNOME VFS
-    private static native boolean initializeGnomeVfs();
-    private static native byte[] probeUsingGnomeVfs(long pathAddress);
+    private static native byte[] probeGio(long pathAddress);
 
     static {
         AccessController.doPrivileged(new PrivilegedAction<>() {
--- a/jdk/src/java.base/unix/native/libnio/ch/Net.c	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/unix/native/libnio/ch/Net.c	Mon Aug 10 14:05:37 2015 +0300
@@ -29,6 +29,7 @@
 #include <string.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
+#include <limits.h>
 
 #include "jni.h"
 #include "jni_util.h"
@@ -709,7 +710,12 @@
     int rv;
     pfd.fd = fdval(env, fdo);
     pfd.events = events;
-    rv = poll(&pfd, 1, timeout);
+    if (timeout < -1) {
+        timeout = -1;
+    } else if (timeout > INT_MAX) {
+        timeout = INT_MAX;
+    }
+    rv = poll(&pfd, 1, (int)timeout);
 
     if (rv >= 0) {
         return pfd.revents;
--- a/jdk/src/java.base/unix/native/libnio/fs/GnomeFileTypeDetector.c	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.base/unix/native/libnio/fs/GnomeFileTypeDetector.c	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,11 @@
 #include <string.h>
 #endif
 
+/*
+ * For reference see for example the GFileInfo section at
+ * https://developer.gnome.org/gio/unstable/.
+ */
+
 /* Definitions for GIO */
 
 #define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type"
@@ -68,18 +73,6 @@
 static g_file_info_get_content_type_func g_file_info_get_content_type;
 
 
-/* Definitions for GNOME VFS */
-
-typedef int gboolean;
-
-typedef gboolean (*gnome_vfs_init_function)(void);
-typedef const char* (*gnome_vfs_mime_type_from_name_function)
-    (const char* filename);
-
-static gnome_vfs_init_function gnome_vfs_init;
-static gnome_vfs_mime_type_from_name_function gnome_vfs_mime_type_from_name;
-
-
 #include "sun_nio_fs_GnomeFileTypeDetector.h"
 
 
@@ -127,7 +120,7 @@
 }
 
 JNIEXPORT jbyteArray JNICALL
-Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio
+Java_sun_nio_fs_GnomeFileTypeDetector_probeGio
     (JNIEnv* env, jclass this, jlong pathAddress)
 {
     char* path = (char*)jlong_to_ptr(pathAddress);
@@ -153,52 +146,3 @@
 
     return result;
 }
-
-JNIEXPORT jboolean JNICALL
-Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs
-    (JNIEnv* env, jclass this)
-{
-    void* vfs_handle;
-
-    vfs_handle = dlopen("libgnomevfs-2.so", RTLD_LAZY);
-    if (vfs_handle == NULL) {
-        vfs_handle = dlopen("libgnomevfs-2.so.0", RTLD_LAZY);
-    }
-    if (vfs_handle == NULL) {
-        return JNI_FALSE;
-    }
-
-    gnome_vfs_init = (gnome_vfs_init_function)dlsym(vfs_handle, "gnome_vfs_init");
-    gnome_vfs_mime_type_from_name = (gnome_vfs_mime_type_from_name_function)
-        dlsym(vfs_handle, "gnome_vfs_mime_type_from_name");
-
-    if (gnome_vfs_init == NULL ||
-        gnome_vfs_mime_type_from_name == NULL)
-    {
-        dlclose(vfs_handle);
-        return JNI_FALSE;
-    }
-
-    (*gnome_vfs_init)();
-    return JNI_TRUE;
-}
-
-JNIEXPORT jbyteArray JNICALL
-Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGnomeVfs
-    (JNIEnv* env, jclass this, jlong pathAddress)
-{
-    char* path = (char*)jlong_to_ptr(pathAddress);
-    const char* mime = (*gnome_vfs_mime_type_from_name)(path);
-
-    if (mime == NULL) {
-        return NULL;
-    } else {
-        jbyteArray result;
-        jsize len = strlen(mime);
-        result = (*env)->NewByteArray(env, len);
-        if (result != NULL) {
-            (*env)->SetByteArrayRegion(env, result, 0, len, (jbyte*)mime);
-        }
-        return result;
-    }
-}
--- a/jdk/src/java.logging/share/classes/java/util/logging/ConsoleHandler.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/ConsoleHandler.java	Mon Aug 10 14:05:37 2015 +0300
@@ -27,25 +27,25 @@
 package java.util.logging;
 
 /**
- * This <tt>Handler</tt> publishes log records to <tt>System.err</tt>.
- * By default the <tt>SimpleFormatter</tt> is used to generate brief summaries.
+ * This {@code Handler} publishes log records to {@code System.err}.
+ * By default the {@code SimpleFormatter} is used to generate brief summaries.
  * <p>
  * <b>Configuration:</b>
- * By default each <tt>ConsoleHandler</tt> is initialized using the following
- * <tt>LogManager</tt> configuration properties where {@code <handler-name>}
+ * By default each {@code ConsoleHandler} is initialized using the following
+ * {@code LogManager} configuration properties where {@code <handler-name>}
  * refers to the fully-qualified class name of the handler.
  * If properties are not defined
  * (or have invalid values) then the specified default values are used.
  * <ul>
  * <li>   &lt;handler-name&gt;.level
- *        specifies the default level for the <tt>Handler</tt>
- *        (defaults to <tt>Level.INFO</tt>). </li>
+ *        specifies the default level for the {@code Handler}
+ *        (defaults to {@code Level.INFO}). </li>
  * <li>   &lt;handler-name&gt;.filter
- *        specifies the name of a <tt>Filter</tt> class to use
- *        (defaults to no <tt>Filter</tt>). </li>
+ *        specifies the name of a {@code Filter} class to use
+ *        (defaults to no {@code Filter}). </li>
  * <li>   &lt;handler-name&gt;.formatter
- *        specifies the name of a <tt>Formatter</tt> class to use
- *        (defaults to <tt>java.util.logging.SimpleFormatter</tt>). </li>
+ *        specifies the name of a {@code Formatter} class to use
+ *        (defaults to {@code java.util.logging.SimpleFormatter}). </li>
  * <li>   &lt;handler-name&gt;.encoding
  *        the name of the character set encoding to use (defaults to
  *        the default platform encoding). </li>
@@ -68,10 +68,10 @@
 public class ConsoleHandler extends StreamHandler {
 
     /**
-     * Create a <tt>ConsoleHandler</tt> for <tt>System.err</tt>.
+     * Create a {@code ConsoleHandler} for {@code System.err}.
      * <p>
-     * The <tt>ConsoleHandler</tt> is configured based on
-     * <tt>LogManager</tt> properties (or their default values).
+     * The {@code ConsoleHandler} is configured based on
+     * {@code LogManager} properties (or their default values).
      *
      */
     public ConsoleHandler() {
@@ -82,10 +82,10 @@
     }
 
     /**
-     * Publish a <tt>LogRecord</tt>.
+     * Publish a {@code LogRecord}.
      * <p>
-     * The logging request was made initially to a <tt>Logger</tt> object,
-     * which initialized the <tt>LogRecord</tt> and forwarded it here.
+     * The logging request was made initially to a {@code Logger} object,
+     * which initialized the {@code LogRecord} and forwarded it here.
      *
      * @param  record  description of the log event. A null record is
      *                 silently ignored and is not published
@@ -97,9 +97,9 @@
     }
 
     /**
-     * Override <tt>StreamHandler.close</tt> to do a flush but not
+     * Override {@code StreamHandler.close} to do a flush but not
      * to close the output stream.  That is, we do <b>not</b>
-     * close <tt>System.err</tt>.
+     * close {@code System.err}.
      */
     @Override
     public void close() {
--- a/jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java	Mon Aug 10 14:05:37 2015 +0300
@@ -48,9 +48,9 @@
 import java.util.Set;
 
 /**
- * Simple file logging <tt>Handler</tt>.
+ * Simple file logging {@code Handler}.
  * <p>
- * The <tt>FileHandler</tt> can either write to a specified file,
+ * The {@code FileHandler} can either write to a specified file,
  * or it can write to a rotating set of files.
  * <p>
  * For a rotating set of files, as each file reaches a given size
@@ -61,24 +61,24 @@
  * By default buffering is enabled in the IO libraries but each log
  * record is flushed out when it is complete.
  * <p>
- * By default the <tt>XMLFormatter</tt> class is used for formatting.
+ * By default the {@code XMLFormatter} class is used for formatting.
  * <p>
  * <b>Configuration:</b>
- * By default each <tt>FileHandler</tt> is initialized using the following
- * <tt>LogManager</tt> configuration properties where <tt>&lt;handler-name&gt;</tt>
+ * By default each {@code FileHandler} is initialized using the following
+ * {@code LogManager} configuration properties where {@code <handler-name>}
  * refers to the fully-qualified class name of the handler.
  * If properties are not defined
  * (or have invalid values) then the specified default values are used.
  * <ul>
  * <li>   &lt;handler-name&gt;.level
- *        specifies the default level for the <tt>Handler</tt>
- *        (defaults to <tt>Level.ALL</tt>). </li>
+ *        specifies the default level for the {@code Handler}
+ *        (defaults to {@code Level.ALL}). </li>
  * <li>   &lt;handler-name&gt;.filter
- *        specifies the name of a <tt>Filter</tt> class to use
- *        (defaults to no <tt>Filter</tt>). </li>
+ *        specifies the name of a {@code Filter} class to use
+ *        (defaults to no {@code Filter}). </li>
  * <li>   &lt;handler-name&gt;.formatter
- *        specifies the name of a <tt>Formatter</tt> class to use
- *        (defaults to <tt>java.util.logging.XMLFormatter</tt>) </li>
+ *        specifies the name of a {@code Formatter} class to use
+ *        (defaults to {@code java.util.logging.XMLFormatter}) </li>
  * <li>   &lt;handler-name&gt;.encoding
  *        the name of the character set encoding to use (defaults to
  *        the default platform encoding). </li>
@@ -129,10 +129,10 @@
  * <p>
  * Generation numbers follow the sequence 0, 1, 2, etc.
  * <p>
- * Normally the "%u" unique field is set to 0.  However, if the <tt>FileHandler</tt>
+ * Normally the "%u" unique field is set to 0.  However, if the {@code FileHandler}
  * tries to open the filename and finds the file is currently in use by
  * another process it will increment the unique number field and try
- * again.  This will be repeated until <tt>FileHandler</tt> finds a file name that
+ * again.  This will be repeated until {@code FileHandler} finds a file name that
  * is  not currently in use. If there is a conflict and no "%u" field has
  * been specified, it will be added at the end of the filename after a dot.
  * (This will be after any automatically added generation number.)
@@ -249,12 +249,12 @@
 
 
     /**
-     * Construct a default <tt>FileHandler</tt>.  This will be configured
-     * entirely from <tt>LogManager</tt> properties (or their default values).
+     * Construct a default {@code FileHandler}.  This will be configured
+     * entirely from {@code LogManager} properties (or their default values).
      *
      * @exception  IOException if there are IO problems opening the files.
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control"))</tt>.
+     *             the caller does not have {@code LoggingPermission("control"))}.
      * @exception  NullPointerException if pattern property is an empty String.
      */
     public FileHandler() throws IOException, SecurityException {
@@ -269,9 +269,9 @@
     }
 
     /**
-     * Initialize a <tt>FileHandler</tt> to write to the given filename.
+     * Initialize a {@code FileHandler} to write to the given filename.
      * <p>
-     * The <tt>FileHandler</tt> is configured based on <tt>LogManager</tt>
+     * The {@code FileHandler} is configured based on {@code LogManager}
      * properties (or their default values) except that the given pattern
      * argument is used as the filename pattern, the file limit is
      * set to no limit, and the file count is set to one.
@@ -282,7 +282,7 @@
      * @param pattern  the name of the output file
      * @exception  IOException if there are IO problems opening the files.
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      * @exception  IllegalArgumentException if pattern is an empty string
      */
     public FileHandler(String pattern) throws IOException, SecurityException {
@@ -298,14 +298,14 @@
     }
 
     /**
-     * Initialize a <tt>FileHandler</tt> to write to the given filename,
+     * Initialize a {@code FileHandler} to write to the given filename,
      * with optional append.
      * <p>
-     * The <tt>FileHandler</tt> is configured based on <tt>LogManager</tt>
+     * The {@code FileHandler} is configured based on {@code LogManager}
      * properties (or their default values) except that the given pattern
      * argument is used as the filename pattern, the file limit is
      * set to no limit, the file count is set to one, and the append
-     * mode is set to the given <tt>append</tt> argument.
+     * mode is set to the given {@code append} argument.
      * <p>
      * There is no limit on the amount of data that may be written,
      * so use this with care.
@@ -314,7 +314,7 @@
      * @param append  specifies append mode
      * @exception  IOException if there are IO problems opening the files.
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      * @exception  IllegalArgumentException if pattern is an empty string
      */
     public FileHandler(String pattern, boolean append) throws IOException,
@@ -332,12 +332,12 @@
     }
 
     /**
-     * Initialize a <tt>FileHandler</tt> to write to a set of files.  When
+     * Initialize a {@code FileHandler} to write to a set of files.  When
      * (approximately) the given limit has been written to one file,
      * another file will be opened.  The output will cycle through a set
      * of count files.
      * <p>
-     * The <tt>FileHandler</tt> is configured based on <tt>LogManager</tt>
+     * The {@code FileHandler} is configured based on {@code LogManager}
      * properties (or their default values) except that the given pattern
      * argument is used as the filename pattern, the file limit is
      * set to the limit argument, and the file count is set to the
@@ -350,7 +350,7 @@
      * @param count  the number of files to use
      * @exception  IOException if there are IO problems opening the files.
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      * @exception  IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
      * @exception  IllegalArgumentException if pattern is an empty string
      */
@@ -368,17 +368,17 @@
     }
 
     /**
-     * Initialize a <tt>FileHandler</tt> to write to a set of files
+     * Initialize a {@code FileHandler} to write to a set of files
      * with optional append.  When (approximately) the given limit has
      * been written to one file, another file will be opened.  The
      * output will cycle through a set of count files.
      * <p>
-     * The <tt>FileHandler</tt> is configured based on <tt>LogManager</tt>
+     * The {@code FileHandler} is configured based on {@code LogManager}
      * properties (or their default values) except that the given pattern
      * argument is used as the filename pattern, the file limit is
      * set to the limit argument, and the file count is set to the
      * given count argument, and the append mode is set to the given
-     * <tt>append</tt> argument.
+     * {@code append} argument.
      * <p>
      * The count must be at least 1.
      *
@@ -388,7 +388,7 @@
      * @param append  specifies append mode
      * @exception  IOException if there are IO problems opening the files.
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      * @exception  IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
      * @exception  IllegalArgumentException if pattern is an empty string
      *
@@ -711,7 +711,7 @@
     }
 
     /**
-     * Format and publish a <tt>LogRecord</tt>.
+     * Format and publish a {@code LogRecord}.
      *
      * @param  record  description of the log event. A null record is
      *                 silently ignored and is not published
@@ -743,7 +743,7 @@
      * Close all the files.
      *
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     @Override
     public synchronized void close() throws SecurityException {
--- a/jdk/src/java.logging/share/classes/java/util/logging/Handler.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/Handler.java	Mon Aug 10 14:05:37 2015 +0300
@@ -32,18 +32,18 @@
 import java.security.PrivilegedAction;
 
 /**
- * A <tt>Handler</tt> object takes log messages from a <tt>Logger</tt> and
+ * A {@code Handler} object takes log messages from a {@code Logger} and
  * exports them.  It might for example, write them to a console
  * or write them to a file, or send them to a network logging service,
  * or forward them to an OS log, or whatever.
  * <p>
- * A <tt>Handler</tt> can be disabled by doing a <tt>setLevel(Level.OFF)</tt>
- * and can  be re-enabled by doing a <tt>setLevel</tt> with an appropriate level.
+ * A {@code Handler} can be disabled by doing a {@code setLevel(Level.OFF)}
+ * and can  be re-enabled by doing a {@code setLevel} with an appropriate level.
  * <p>
- * <tt>Handler</tt> classes typically use <tt>LogManager</tt> properties to set
- * default values for the <tt>Handler</tt>'s <tt>Filter</tt>, <tt>Formatter</tt>,
- * and <tt>Level</tt>.  See the specific documentation for each concrete
- * <tt>Handler</tt> class.
+ * {@code Handler} classes typically use {@code LogManager} properties to set
+ * default values for the {@code Handler}'s {@code Filter}, {@code Formatter},
+ * and {@code Level}.  See the specific documentation for each concrete
+ * {@code Handler} class.
  *
  *
  * @since 1.4
@@ -67,10 +67,10 @@
     private volatile String encoding;
 
     /**
-     * Default constructor.  The resulting <tt>Handler</tt> has a log
-     * level of <tt>Level.ALL</tt>, no <tt>Formatter</tt>, and no
-     * <tt>Filter</tt>.  A default <tt>ErrorManager</tt> instance is installed
-     * as the <tt>ErrorManager</tt>.
+     * Default constructor.  The resulting {@code Handler} has a log
+     * level of {@code Level.ALL}, no {@code Formatter}, and no
+     * {@code Filter}.  A default {@code ErrorManager} instance is installed
+     * as the {@code ErrorManager}.
      */
     protected Handler() {
     }
@@ -122,12 +122,12 @@
     }
 
     /**
-     * Publish a <tt>LogRecord</tt>.
+     * Publish a {@code LogRecord}.
      * <p>
-     * The logging request was made initially to a <tt>Logger</tt> object,
-     * which initialized the <tt>LogRecord</tt> and forwarded it here.
+     * The logging request was made initially to a {@code Logger} object,
+     * which initialized the {@code LogRecord} and forwarded it here.
      * <p>
-     * The <tt>Handler</tt>  is responsible for formatting the message, when and
+     * The {@code Handler}  is responsible for formatting the message, when and
      * if necessary.  The formatting should include localization.
      *
      * @param  record  description of the log event. A null record is
@@ -141,28 +141,28 @@
     public abstract void flush();
 
     /**
-     * Close the <tt>Handler</tt> and free all associated resources.
+     * Close the {@code Handler} and free all associated resources.
      * <p>
-     * The close method will perform a <tt>flush</tt> and then close the
-     * <tt>Handler</tt>.   After close has been called this <tt>Handler</tt>
+     * The close method will perform a {@code flush} and then close the
+     * {@code Handler}.   After close has been called this {@code Handler}
      * should no longer be used.  Method calls may either be silently
      * ignored or may throw runtime exceptions.
      *
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     public abstract void close() throws SecurityException;
 
     /**
-     * Set a <tt>Formatter</tt>.  This <tt>Formatter</tt> will be used
-     * to format <tt>LogRecords</tt> for this <tt>Handler</tt>.
+     * Set a {@code Formatter}.  This {@code Formatter} will be used
+     * to format {@code LogRecords} for this {@code Handler}.
      * <p>
-     * Some <tt>Handlers</tt> may not use <tt>Formatters</tt>, in
-     * which case the <tt>Formatter</tt> will be remembered, but not used.
+     * Some {@code Handlers} may not use {@code Formatters}, in
+     * which case the {@code Formatter} will be remembered, but not used.
      *
-     * @param newFormatter the <tt>Formatter</tt> to use (may not be null)
+     * @param newFormatter the {@code Formatter} to use (may not be null)
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setFormatter(Formatter newFormatter) throws SecurityException {
         checkPermission();
@@ -170,23 +170,23 @@
     }
 
     /**
-     * Return the <tt>Formatter</tt> for this <tt>Handler</tt>.
-     * @return the <tt>Formatter</tt> (may be null).
+     * Return the {@code Formatter} for this {@code Handler}.
+     * @return the {@code Formatter} (may be null).
      */
     public Formatter getFormatter() {
         return formatter;
     }
 
     /**
-     * Set the character encoding used by this <tt>Handler</tt>.
+     * Set the character encoding used by this {@code Handler}.
      * <p>
-     * The encoding should be set before any <tt>LogRecords</tt> are written
-     * to the <tt>Handler</tt>.
+     * The encoding should be set before any {@code LogRecords} are written
+     * to the {@code Handler}.
      *
      * @param encoding  The name of a supported character encoding.
      *        May be null, to indicate the default platform encoding.
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      * @exception  UnsupportedEncodingException if the named encoding is
      *          not supported.
      */
@@ -206,7 +206,7 @@
     }
 
     /**
-     * Return the character encoding for this <tt>Handler</tt>.
+     * Return the character encoding for this {@code Handler}.
      *
      * @return  The encoding name.  May be null, which indicates the
      *          default encoding should be used.
@@ -216,15 +216,15 @@
     }
 
     /**
-     * Set a <tt>Filter</tt> to control output on this <tt>Handler</tt>.
+     * Set a {@code Filter} to control output on this {@code Handler}.
      * <P>
-     * For each call of <tt>publish</tt> the <tt>Handler</tt> will call
-     * this <tt>Filter</tt> (if it is non-null) to check if the
-     * <tt>LogRecord</tt> should be published or discarded.
+     * For each call of {@code publish} the {@code Handler} will call
+     * this {@code Filter} (if it is non-null) to check if the
+     * {@code LogRecord} should be published or discarded.
      *
-     * @param   newFilter  a <tt>Filter</tt> object (may be null)
+     * @param   newFilter  a {@code Filter} object (may be null)
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setFilter(Filter newFilter) throws SecurityException {
         checkPermission();
@@ -232,9 +232,9 @@
     }
 
     /**
-     * Get the current <tt>Filter</tt> for this <tt>Handler</tt>.
+     * Get the current {@code Filter} for this {@code Handler}.
      *
-     * @return  a <tt>Filter</tt> object (may be null)
+     * @return  a {@code Filter} object (may be null)
      */
     public Filter getFilter() {
         return filter;
@@ -248,7 +248,7 @@
      *
      * @param em  the new ErrorManager
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setErrorManager(ErrorManager em) {
         checkPermission();
@@ -263,7 +263,7 @@
      *
      * @return the ErrorManager for this Handler
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     public ErrorManager getErrorManager() {
         checkPermission();
@@ -291,16 +291,16 @@
 
     /**
      * Set the log level specifying which message levels will be
-     * logged by this <tt>Handler</tt>.  Message levels lower than this
+     * logged by this {@code Handler}.  Message levels lower than this
      * value will be discarded.
      * <p>
      * The intention is to allow developers to turn on voluminous
      * logging, but to limit the messages that are sent to certain
-     * <tt>Handlers</tt>.
+     * {@code Handlers}.
      *
      * @param newLevel   the new value for the log level
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setLevel(Level newLevel) throws SecurityException {
         if (newLevel == null) {
@@ -312,7 +312,7 @@
 
     /**
      * Get the log level specifying which messages will be
-     * logged by this <tt>Handler</tt>.  Message levels lower
+     * logged by this {@code Handler}.  Message levels lower
      * than this level will be discarded.
      * @return  the level of messages being logged.
      */
@@ -321,16 +321,16 @@
     }
 
     /**
-     * Check if this <tt>Handler</tt> would actually log a given <tt>LogRecord</tt>.
+     * Check if this {@code Handler} would actually log a given {@code LogRecord}.
      * <p>
-     * This method checks if the <tt>LogRecord</tt> has an appropriate
-     * <tt>Level</tt> and  whether it satisfies any <tt>Filter</tt>.  It also
-     * may make other <tt>Handler</tt> specific checks that might prevent a
-     * handler from logging the <tt>LogRecord</tt>. It will return false if
-     * the <tt>LogRecord</tt> is null.
+     * This method checks if the {@code LogRecord} has an appropriate
+     * {@code Level} and  whether it satisfies any {@code Filter}.  It also
+     * may make other {@code Handler} specific checks that might prevent a
+     * handler from logging the {@code LogRecord}. It will return false if
+     * the {@code LogRecord} is null.
      *
-     * @param record  a <tt>LogRecord</tt>
-     * @return true if the <tt>LogRecord</tt> would be logged.
+     * @param record  a {@code LogRecord}
+     * @return true if the {@code LogRecord} would be logged.
      *
      */
     public boolean isLoggable(LogRecord record) {
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Mon Aug 10 14:05:37 2015 +0300
@@ -72,7 +72,7 @@
  * loaded, an object will be instantiated, and that object's constructor
  * is responsible for reading in the initial configuration.  (That object
  * may use other system properties to control its configuration.)  The
- * alternate configuration class can use <tt>readConfiguration(InputStream)</tt>
+ * alternate configuration class can use {@code readConfiguration(InputStream)}
  * to define properties in the LogManager.
  * <p>
  * If "java.util.logging.config.class" property is <b>not</b> set,
@@ -353,7 +353,8 @@
         // see that initializationDone is still false, and perform the
         // initialization.
         //
-        synchronized(this) {
+        configurationLock.lock();
+        try {
             // If initializedCalled is true it means that we're already in
             // the process of initializing the LogManager in this thread.
             // There has been a recursive call to ensureLogManagerInitialized().
@@ -409,6 +410,8 @@
             } finally {
                 initializationDone = true;
             }
+        } finally {
+            configurationLock.unlock();
         }
     }
 
@@ -423,33 +426,22 @@
         return manager;
     }
 
-    private void readPrimordialConfiguration() {
+    private void readPrimordialConfiguration() { // must be called while holding configurationLock
         if (!readPrimordialConfiguration) {
-            synchronized (this) {
-                if (!readPrimordialConfiguration) {
-                    // If System.in/out/err are null, it's a good
-                    // indication that we're still in the
-                    // bootstrapping phase
-                    if (System.out == null) {
-                        return;
-                    }
-                    readPrimordialConfiguration = true;
+            // If System.in/out/err are null, it's a good
+            // indication that we're still in the
+            // bootstrapping phase
+            if (System.out == null) {
+                return;
+            }
+            readPrimordialConfiguration = true;
+            try {
+                readConfiguration();
 
-                    try {
-                        AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
-                                @Override
-                                public Void run() throws Exception {
-                                    readConfiguration();
-
-                                    // Platform loggers begin to delegate to java.util.logging.Logger
-                                    sun.util.logging.PlatformLogger.redirectPlatformLoggers();
-                                    return null;
-                                }
-                            });
-                    } catch (Exception ex) {
-                        assert false : "Exception raised while reading logging configuration: " + ex;
-                    }
-                }
+                // Platform loggers begin to delegate to java.util.logging.Logger
+                sun.util.logging.PlatformLogger.redirectPlatformLoggers();
+            } catch (Exception ex) {
+                assert false : "Exception raised while reading logging configuration: " + ex;
             }
         }
     }
@@ -1808,7 +1800,7 @@
         = "java.util.logging:type=Logging";
 
     /**
-     * Returns <tt>LoggingMXBean</tt> for managing loggers.
+     * Returns {@code LoggingMXBean} for managing loggers.
      * An alternative way to manage loggers is through the
      * {@link java.lang.management.PlatformLoggingMXBean} interface
      * that can be obtained by calling:
--- a/jdk/src/java.logging/share/classes/java/util/logging/Logger.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/Logger.java	Mon Aug 10 14:05:37 2015 +0300
@@ -65,7 +65,7 @@
  * <p>
  * Each Logger has a "Level" associated with it.  This reflects
  * a minimum Level that this logger cares about.  If a Logger's
- * level is set to <tt>null</tt>, then its effective level is inherited
+ * level is set to {@code null}, then its effective level is inherited
  * from its parent, which may in turn obtain it recursively from its
  * parent, and so on up the tree.
  * <p>
@@ -74,7 +74,7 @@
  * of the LogManager class.  However it may also be dynamically changed
  * by calls on the Logger.setLevel method.  If a logger's level is
  * changed the change may also affect child loggers, since any child
- * logger that has <tt>null</tt> as its level will inherit its
+ * logger that has {@code null} as its level will inherit its
  * effective level from its parent.
  * <p>
  * On each logging call the Logger initially performs a cheap
@@ -116,25 +116,25 @@
  * unnecessary message construction. For example, if the developer wants to
  * log system health status for diagnosis, with the String-accepting version,
  * the code would look like:
- <pre><code>
-
-   class DiagnosisMessages {
-     static String systemHealthStatus() {
-       // collect system health information
-       ...
-     }
-   }
-   ...
-   logger.log(Level.FINER, DiagnosisMessages.systemHealthStatus());
-</code></pre>
+ * <pre>{@code
+ *
+ *  class DiagnosisMessages {
+ *    static String systemHealthStatus() {
+ *      // collect system health information
+ *      ...
+ *    }
+ *  }
+ *  ...
+ *  logger.log(Level.FINER, DiagnosisMessages.systemHealthStatus());
+ * }</pre>
  * With the above code, the health status is collected unnecessarily even when
  * the log level FINER is disabled. With the Supplier-accepting version as
  * below, the status will only be collected when the log level FINER is
  * enabled.
- <pre><code>
-
-   logger.log(Level.FINER, DiagnosisMessages::systemHealthStatus);
-</code></pre>
+ * <pre>{@code
+ *
+ *  logger.log(Level.FINER, DiagnosisMessages::systemHealthStatus);
+ * }</pre>
  * <p>
  * When looking for a {@code ResourceBundle}, the logger will first look at
  * whether a bundle was specified using {@link
@@ -345,11 +345,11 @@
      * which may cause deadlocks with the LogManager class initialization.
      * In such cases two class initialization wait for each other to complete.
      * The preferred way to get the global logger object is via the call
-     * <code>Logger.getGlobal()</code>.
+     * {@code Logger.getGlobal()}.
      * For compatibility with old JDK versions where the
-     * <code>Logger.getGlobal()</code> is not available use the call
-     * <code>Logger.getLogger(Logger.GLOBAL_LOGGER_NAME)</code>
-     * or <code>Logger.getLogger("global")</code>.
+     * {@code Logger.getGlobal()} is not available use the call
+     * {@code Logger.getLogger(Logger.GLOBAL_LOGGER_NAME)}
+     * or {@code Logger.getLogger("global")}.
      */
     @Deprecated
     public static final Logger global = new Logger(GLOBAL_LOGGER_NAME);
--- a/jdk/src/java.logging/share/classes/java/util/logging/Logging.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/Logging.java	Mon Aug 10 14:05:37 2015 +0300
@@ -32,7 +32,7 @@
 /**
  * Logging is the implementation class of LoggingMXBean.
  *
- * The <tt>LoggingMXBean</tt> interface provides a standard
+ * The {@code LoggingMXBean} interface provides a standard
  * method for management access to the individual
  * {@code Logger} objects available at runtime.
  *
--- a/jdk/src/java.logging/share/classes/java/util/logging/LoggingMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LoggingMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -36,12 +36,12 @@
  * the {@code PlatformLoggingMXBean} object representing the management
  * interface for logging.
  *
- * <p>There is a single global instance of the <tt>LoggingMXBean</tt>.
+ * <p>There is a single global instance of the {@code LoggingMXBean}.
  * This instance is an {@link javax.management.MXBean MXBean} that
  * can be obtained by calling the {@link LogManager#getLoggingMXBean}
  * method or from the
  * {@linkplain java.lang.management.ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>}.
+ * platform MBeanServer}.
  * <p>
  * The {@link javax.management.ObjectName ObjectName} that uniquely identifies
  * the management interface for logging within the {@code MBeanServer} is:
@@ -65,14 +65,14 @@
      * calls {@link LogManager#getLoggerNames} and returns a list
      * of the logger names.
      *
-     * @return A list of <tt>String</tt> each of which is a
-     *         currently registered <tt>Logger</tt> name.
+     * @return A list of {@code String} each of which is a
+     *         currently registered {@code Logger} name.
      */
     public java.util.List<String> getLoggerNames();
 
     /**
      * Gets the name of the log level associated with the specified logger.
-     * If the specified logger does not exist, <tt>null</tt>
+     * If the specified logger does not exist, {@code null}
      * is returned.
      * This method first finds the logger of the given name and
      * then returns the name of the log level by calling:
@@ -81,16 +81,16 @@
      * </blockquote>
      *
      * <p>
-     * If the <tt>Level</tt> of the specified logger is <tt>null</tt>,
+     * If the {@code Level} of the specified logger is {@code null},
      * which means that this logger's effective level is inherited
      * from its parent, an empty string will be returned.
      *
-     * @param loggerName The name of the <tt>Logger</tt> to be retrieved.
+     * @param loggerName The name of the {@code Logger} to be retrieved.
      *
      * @return The name of the log level of the specified logger; or
      *         an empty string if the log level of the specified logger
-     *         is <tt>null</tt>.  If the specified logger does not
-     *         exist, <tt>null</tt> is returned.
+     *         is {@code null}.  If the specified logger does not
+     *         exist, {@code null} is returned.
      *
      * @see Logger#getLevel
      */
@@ -98,22 +98,22 @@
 
     /**
      * Sets the specified logger to the specified new level.
-     * If the <tt>levelName</tt> is not <tt>null</tt>, the level
-     * of the specified logger is set to the parsed <tt>Level</tt>
-     * matching the <tt>levelName</tt>.
-     * If the <tt>levelName</tt> is <tt>null</tt>, the level
-     * of the specified logger is set to <tt>null</tt> and
+     * If the {@code levelName} is not {@code null}, the level
+     * of the specified logger is set to the parsed {@code Level}
+     * matching the {@code levelName}.
+     * If the {@code levelName} is {@code null}, the level
+     * of the specified logger is set to {@code null} and
      * the effective level of the logger is inherited from
      * its nearest ancestor with a specific (non-null) level value.
      *
-     * @param loggerName The name of the <tt>Logger</tt> to be set.
+     * @param loggerName The name of the {@code Logger} to be set.
      *                   Must be non-null.
      * @param levelName The name of the level to set on the specified logger,
-     *                 or <tt>null</tt> if setting the level to inherit
+     *                 or {@code null} if setting the level to inherit
      *                 from its nearest ancestor.
      *
      * @throws IllegalArgumentException if the specified logger
-     * does not exist, or <tt>levelName</tt> is not a valid level name.
+     * does not exist, or {@code levelName} is not a valid level name.
      *
      * @throws SecurityException if a security manager exists and if
      * the caller does not have LoggingPermission("control").
@@ -124,15 +124,15 @@
 
     /**
      * Returns the name of the parent for the specified logger.
-     * If the specified logger does not exist, <tt>null</tt> is returned.
-     * If the specified logger is the root <tt>Logger</tt> in the namespace,
+     * If the specified logger does not exist, {@code null} is returned.
+     * If the specified logger is the root {@code Logger} in the namespace,
      * the result will be an empty string.
      *
-     * @param loggerName The name of a <tt>Logger</tt>.
+     * @param loggerName The name of a {@code Logger}.
      *
      * @return the name of the nearest existing parent logger;
      *         an empty string if the specified logger is the root logger.
-     *         If the specified logger does not exist, <tt>null</tt>
+     *         If the specified logger does not exist, {@code null}
      *         is returned.
      */
     public String getParentLoggerName(String loggerName);
--- a/jdk/src/java.logging/share/classes/java/util/logging/MemoryHandler.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/MemoryHandler.java	Mon Aug 10 14:05:37 2015 +0300
@@ -26,48 +26,48 @@
 package java.util.logging;
 
 /**
- * <tt>Handler</tt> that buffers requests in a circular buffer in memory.
+ * {@code Handler} that buffers requests in a circular buffer in memory.
  * <p>
- * Normally this <tt>Handler</tt> simply stores incoming <tt>LogRecords</tt>
+ * Normally this {@code Handler} simply stores incoming {@code LogRecords}
  * into its memory buffer and discards earlier records.  This buffering
  * is very cheap and avoids formatting costs.  On certain trigger
- * conditions, the <tt>MemoryHandler</tt> will push out its current buffer
- * contents to a target <tt>Handler</tt>, which will typically publish
+ * conditions, the {@code MemoryHandler} will push out its current buffer
+ * contents to a target {@code Handler}, which will typically publish
  * them to the outside world.
  * <p>
  * There are three main models for triggering a push of the buffer:
  * <ul>
  * <li>
- * An incoming <tt>LogRecord</tt> has a type that is greater than
- * a pre-defined level, the <tt>pushLevel</tt>. </li>
+ * An incoming {@code LogRecord} has a type that is greater than
+ * a pre-defined level, the {@code pushLevel}. </li>
  * <li>
- * An external class calls the <tt>push</tt> method explicitly. </li>
+ * An external class calls the {@code push} method explicitly. </li>
  * <li>
- * A subclass overrides the <tt>log</tt> method and scans each incoming
- * <tt>LogRecord</tt> and calls <tt>push</tt> if a record matches some
+ * A subclass overrides the {@code log} method and scans each incoming
+ * {@code LogRecord} and calls {@code push} if a record matches some
  * desired criteria. </li>
  * </ul>
  * <p>
  * <b>Configuration:</b>
- * By default each <tt>MemoryHandler</tt> is initialized using the following
- * <tt>LogManager</tt> configuration properties where <tt>&lt;handler-name&gt;</tt>
+ * By default each {@code MemoryHandler} is initialized using the following
+ * {@code LogManager} configuration properties where {@code <handler-name>}
  * refers to the fully-qualified class name of the handler.
  * If properties are not defined
  * (or have invalid values) then the specified default values are used.
  * If no default value is defined then a RuntimeException is thrown.
  * <ul>
  * <li>   &lt;handler-name&gt;.level
- *        specifies the level for the <tt>Handler</tt>
- *        (defaults to <tt>Level.ALL</tt>). </li>
+ *        specifies the level for the {@code Handler}
+ *        (defaults to {@code Level.ALL}). </li>
  * <li>   &lt;handler-name&gt;.filter
- *        specifies the name of a <tt>Filter</tt> class to use
- *        (defaults to no <tt>Filter</tt>). </li>
+ *        specifies the name of a {@code Filter} class to use
+ *        (defaults to no {@code Filter}). </li>
  * <li>   &lt;handler-name&gt;.size
  *        defines the buffer size (defaults to 1000). </li>
  * <li>   &lt;handler-name&gt;.push
- *        defines the <tt>pushLevel</tt> (defaults to <tt>level.SEVERE</tt>). </li>
+ *        defines the {@code pushLevel} (defaults to {@code level.SEVERE}). </li>
  * <li>   &lt;handler-name&gt;.target
- *        specifies the name of the target <tt>Handler </tt> class.
+ *        specifies the name of the target {@code Handler } class.
  *        (no default). </li>
  * </ul>
  * <p>
@@ -95,8 +95,8 @@
     int start, count;
 
     /**
-     * Create a <tt>MemoryHandler</tt> and configure it based on
-     * <tt>LogManager</tt> configuration properties.
+     * Create a {@code MemoryHandler} and configure it based on
+     * {@code LogManager} configuration properties.
      */
     public MemoryHandler() {
         // configure with specific defaults for MemoryHandler
@@ -132,10 +132,10 @@
     }
 
     /**
-     * Create a <tt>MemoryHandler</tt>.
+     * Create a {@code MemoryHandler}.
      * <p>
-     * The <tt>MemoryHandler</tt> is configured based on <tt>LogManager</tt>
-     * properties (or their default values) except that the given <tt>pushLevel</tt>
+     * The {@code MemoryHandler} is configured based on {@code LogManager}
+     * properties (or their default values) except that the given {@code pushLevel}
      * argument and buffer size argument are used.
      *
      * @param target  the Handler to which to publish output.
@@ -161,16 +161,16 @@
     }
 
     /**
-     * Store a <tt>LogRecord</tt> in an internal buffer.
+     * Store a {@code LogRecord} in an internal buffer.
      * <p>
-     * If there is a <tt>Filter</tt>, its <tt>isLoggable</tt>
+     * If there is a {@code Filter}, its {@code isLoggable}
      * method is called to check if the given log record is loggable.
      * If not we return.  Otherwise the given record is copied into
      * an internal circular buffer.  Then the record's level property is
-     * compared with the <tt>pushLevel</tt>. If the given level is
-     * greater than or equal to the <tt>pushLevel</tt> then <tt>push</tt>
+     * compared with the {@code pushLevel}. If the given level is
+     * greater than or equal to the {@code pushLevel} then {@code push}
      * is called to write all buffered records to the target output
-     * <tt>Handler</tt>.
+     * {@code Handler}.
      *
      * @param  record  description of the log event. A null record is
      *                 silently ignored and is not published
@@ -194,7 +194,7 @@
     }
 
     /**
-     * Push any buffered output to the target <tt>Handler</tt>.
+     * Push any buffered output to the target {@code Handler}.
      * <p>
      * The buffer is then cleared.
      */
@@ -210,9 +210,9 @@
     }
 
     /**
-     * Causes a flush on the target <tt>Handler</tt>.
+     * Causes a flush on the target {@code Handler}.
      * <p>
-     * Note that the current contents of the <tt>MemoryHandler</tt>
+     * Note that the current contents of the {@code MemoryHandler}
      * buffer are <b>not</b> written out.  That requires a "push".
      */
     @Override
@@ -221,11 +221,11 @@
     }
 
     /**
-     * Close the <tt>Handler</tt> and free all associated resources.
-     * This will also close the target <tt>Handler</tt>.
+     * Close the {@code Handler} and free all associated resources.
+     * This will also close the target {@code Handler}.
      *
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     @Override
     public void close() throws SecurityException {
@@ -234,13 +234,13 @@
     }
 
     /**
-     * Set the <tt>pushLevel</tt>.  After a <tt>LogRecord</tt> is copied
+     * Set the {@code pushLevel}.  After a {@code LogRecord} is copied
      * into our internal buffer, if its level is greater than or equal to
-     * the <tt>pushLevel</tt>, then <tt>push</tt> will be called.
+     * the {@code pushLevel}, then {@code push} will be called.
      *
-     * @param newLevel the new value of the <tt>pushLevel</tt>
+     * @param newLevel the new value of the {@code pushLevel}
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     public synchronized void setPushLevel(Level newLevel) throws SecurityException {
         if (newLevel == null) {
@@ -251,25 +251,25 @@
     }
 
     /**
-     * Get the <tt>pushLevel</tt>.
+     * Get the {@code pushLevel}.
      *
-     * @return the value of the <tt>pushLevel</tt>
+     * @return the value of the {@code pushLevel}
      */
     public Level getPushLevel() {
         return pushLevel;
     }
 
     /**
-     * Check if this <tt>Handler</tt> would actually log a given
-     * <tt>LogRecord</tt> into its internal buffer.
+     * Check if this {@code Handler} would actually log a given
+     * {@code LogRecord} into its internal buffer.
      * <p>
-     * This method checks if the <tt>LogRecord</tt> has an appropriate level and
-     * whether it satisfies any <tt>Filter</tt>.  However it does <b>not</b>
-     * check whether the <tt>LogRecord</tt> would result in a "push" of the
-     * buffer contents. It will return false if the <tt>LogRecord</tt> is null.
+     * This method checks if the {@code LogRecord} has an appropriate level and
+     * whether it satisfies any {@code Filter}.  However it does <b>not</b>
+     * check whether the {@code LogRecord} would result in a "push" of the
+     * buffer contents. It will return false if the {@code LogRecord} is null.
      *
-     * @param record  a <tt>LogRecord</tt>
-     * @return true if the <tt>LogRecord</tt> would be logged.
+     * @param record  a {@code LogRecord}
+     * @return true if the {@code LogRecord} would be logged.
      *
      */
     @Override
--- a/jdk/src/java.logging/share/classes/java/util/logging/SocketHandler.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/SocketHandler.java	Mon Aug 10 14:05:37 2015 +0300
@@ -30,27 +30,27 @@
 import java.net.*;
 
 /**
- * Simple network logging <tt>Handler</tt>.
+ * Simple network logging {@code Handler}.
  * <p>
- * <tt>LogRecords</tt> are published to a network stream connection.  By default
- * the <tt>XMLFormatter</tt> class is used for formatting.
+ * {@code LogRecords} are published to a network stream connection.  By default
+ * the {@code XMLFormatter} class is used for formatting.
  * <p>
  * <b>Configuration:</b>
- * By default each <tt>SocketHandler</tt> is initialized using the following
- * <tt>LogManager</tt> configuration properties where <tt>&lt;handler-name&gt;</tt>
+ * By default each {@code SocketHandler} is initialized using the following
+ * {@code LogManager} configuration properties where {@code <handler-name>}
  * refers to the fully-qualified class name of the handler.
  * If properties are not defined
  * (or have invalid values) then the specified default values are used.
  * <ul>
  * <li>   &lt;handler-name&gt;.level
- *        specifies the default level for the <tt>Handler</tt>
- *        (defaults to <tt>Level.ALL</tt>). </li>
+ *        specifies the default level for the {@code Handler}
+ *        (defaults to {@code Level.ALL}). </li>
  * <li>   &lt;handler-name&gt;.filter
- *        specifies the name of a <tt>Filter</tt> class to use
- *        (defaults to no <tt>Filter</tt>). </li>
+ *        specifies the name of a {@code Filter} class to use
+ *        (defaults to no {@code Filter}). </li>
  * <li>   &lt;handler-name&gt;.formatter
- *        specifies the name of a <tt>Formatter</tt> class to use
- *        (defaults to <tt>java.util.logging.XMLFormatter</tt>). </li>
+ *        specifies the name of a {@code Formatter} class to use
+ *        (defaults to {@code java.util.logging.XMLFormatter}). </li>
  * <li>   &lt;handler-name&gt;.encoding
  *        the name of the character set encoding to use (defaults to
  *        the default platform encoding). </li>
@@ -73,7 +73,7 @@
  * </ul>
  * <p>
  * The output IO stream is buffered, but is flushed after each
- * <tt>LogRecord</tt> is written.
+ * {@code LogRecord} is written.
  *
  * @since 1.4
  */
@@ -84,7 +84,7 @@
     private int port;
 
     /**
-     * Create a <tt>SocketHandler</tt>, using only <tt>LogManager</tt> properties
+     * Create a {@code SocketHandler}, using only {@code LogManager} properties
      * (or their defaults).
      * @throws IllegalArgumentException if the host or port are invalid or
      *          are not specified as LogManager properties.
@@ -109,9 +109,9 @@
     }
 
     /**
-     * Construct a <tt>SocketHandler</tt> using a specified host and port.
+     * Construct a {@code SocketHandler} using a specified host and port.
      *
-     * The <tt>SocketHandler</tt> is configured based on <tt>LogManager</tt>
+     * The {@code SocketHandler} is configured based on {@code LogManager}
      * properties (or their default values) except that the given target host
      * and port arguments are used. If the host argument is empty, but not
      * null String then the localhost is used.
@@ -153,7 +153,7 @@
      * Close this output stream.
      *
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     @Override
     public synchronized void close() throws SecurityException {
@@ -169,7 +169,7 @@
     }
 
     /**
-     * Format and publish a <tt>LogRecord</tt>.
+     * Format and publish a {@code LogRecord}.
      *
      * @param  record  description of the log event. A null record is
      *                 silently ignored and is not published
--- a/jdk/src/java.logging/share/classes/java/util/logging/StreamHandler.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/StreamHandler.java	Mon Aug 10 14:05:37 2015 +0300
@@ -32,29 +32,29 @@
 import java.util.Objects;
 
 /**
- * Stream based logging <tt>Handler</tt>.
+ * Stream based logging {@code Handler}.
  * <p>
  * This is primarily intended as a base class or support class to
- * be used in implementing other logging <tt>Handlers</tt>.
+ * be used in implementing other logging {@code Handlers}.
  * <p>
- * <tt>LogRecords</tt> are published to a given <tt>java.io.OutputStream</tt>.
+ * {@code LogRecords} are published to a given {@code java.io.OutputStream}.
  * <p>
  * <b>Configuration:</b>
- * By default each <tt>StreamHandler</tt> is initialized using the following
- * <tt>LogManager</tt> configuration properties where <tt>&lt;handler-name&gt;</tt>
+ * By default each {@code StreamHandler} is initialized using the following
+ * {@code LogManager} configuration properties where {@code <handler-name>}
  * refers to the fully-qualified class name of the handler.
  * If properties are not defined
  * (or have invalid values) then the specified default values are used.
  * <ul>
  * <li>   &lt;handler-name&gt;.level
- *        specifies the default level for the <tt>Handler</tt>
- *        (defaults to <tt>Level.INFO</tt>). </li>
+ *        specifies the default level for the {@code Handler}
+ *        (defaults to {@code Level.INFO}). </li>
  * <li>   &lt;handler-name&gt;.filter
- *        specifies the name of a <tt>Filter</tt> class to use
- *         (defaults to no <tt>Filter</tt>). </li>
+ *        specifies the name of a {@code Filter} class to use
+ *         (defaults to no {@code Filter}). </li>
  * <li>   &lt;handler-name&gt;.formatter
- *        specifies the name of a <tt>Formatter</tt> class to use
- *        (defaults to <tt>java.util.logging.SimpleFormatter</tt>). </li>
+ *        specifies the name of a {@code Formatter} class to use
+ *        (defaults to {@code java.util.logging.SimpleFormatter}). </li>
  * <li>   &lt;handler-name&gt;.encoding
  *        the name of the character set encoding to use (defaults to
  *        the default platform encoding). </li>
@@ -81,7 +81,7 @@
     private volatile Writer writer;
 
     /**
-     * Create a <tt>StreamHandler</tt>, with no current output stream.
+     * Create a {@code StreamHandler}, with no current output stream.
      */
     public StreamHandler() {
         // configure with specific defaults for StreamHandler
@@ -89,7 +89,7 @@
     }
 
     /**
-     * Create a <tt>StreamHandler</tt> with a given <tt>Formatter</tt>
+     * Create a {@code StreamHandler} with a given {@code Formatter}
      * and output stream.
      *
      * @param out         the target output stream
@@ -114,13 +114,13 @@
     /**
      * Change the output stream.
      * <P>
-     * If there is a current output stream then the <tt>Formatter</tt>'s
+     * If there is a current output stream then the {@code Formatter}'s
      * tail string is written and the stream is flushed and closed.
      * Then the output stream is replaced with the new output stream.
      *
      * @param out   New output stream.  May not be null.
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      */
     protected synchronized void setOutputStream(OutputStream out) throws SecurityException {
         if (out == null) {
@@ -144,15 +144,15 @@
     }
 
     /**
-     * Set (or change) the character encoding used by this <tt>Handler</tt>.
+     * Set (or change) the character encoding used by this {@code Handler}.
      * <p>
-     * The encoding should be set before any <tt>LogRecords</tt> are written
-     * to the <tt>Handler</tt>.
+     * The encoding should be set before any {@code LogRecords} are written
+     * to the {@code Handler}.
      *
      * @param encoding  The name of a supported character encoding.
      *        May be null, to indicate the default platform encoding.
      * @exception  SecurityException  if a security manager exists and if
-     *             the caller does not have <tt>LoggingPermission("control")</tt>.
+     *             the caller does not have {@code LoggingPermission("control")}.
      * @exception  UnsupportedEncodingException if the named encoding is
      *          not supported.
      */
@@ -173,18 +173,18 @@
     }
 
     /**
-     * Format and publish a <tt>LogRecord</tt>.
+     * Format and publish a {@code LogRecord}.
      * <p>
-     * The <tt>StreamHandler</tt> first checks if there is an <tt>OutputStream</tt>
-     * and if the given <tt>LogRecord</tt> has at least the required log level.
+     * The {@code StreamHandler} first checks if there is an {@code OutputStream}
+     * and if the given {@code LogRecord} has at least the required log level.
      * If not it silently returns.  If so, it calls any associated
-     * <tt>Filter</tt> to check if the record should be published.  If so,
-     * it calls its <tt>Formatter</tt> to format the record and then writes
+     * {@code Filter} to check if the record should be published.  If so,
+     * it calls its {@code Formatter} to format the record and then writes
      * the result to the current output stream.
      * <p>
-     * If this is the first <tt>LogRecord</tt> to be written to a given
-     * <tt>OutputStream</tt>, the <tt>Formatter</tt>'s "head" string is
-     * written to the stream before the <tt>LogRecord</tt> is written.
+     * If this is the first {@code LogRecord} to be written to a given
+     * {@code OutputStream}, the {@code Formatter}'s "head" string is
+     * written to the stream before the {@code LogRecord} is written.
      *
      * @param  record  description of the log event. A null record is
      *                 silently ignored and is not published
@@ -219,14 +219,14 @@
 
 
     /**
-     * Check if this <tt>Handler</tt> would actually log a given <tt>LogRecord</tt>.
+     * Check if this {@code Handler} would actually log a given {@code LogRecord}.
      * <p>
-     * This method checks if the <tt>LogRecord</tt> has an appropriate level and
-     * whether it satisfies any <tt>Filter</tt>.  It will also return false if
+     * This method checks if the {@code LogRecord} has an appropriate level and
+     * whether it satisfies any {@code Filter}.  It will also return false if
      * no output stream has been assigned yet or the LogRecord is null.
      *
-     * @param record  a <tt>LogRecord</tt>
-     * @return true if the <tt>LogRecord</tt> would be logged.
+     * @param record  a {@code LogRecord}
+     * @return true if the {@code LogRecord} would be logged.
      *
      */
     @Override
@@ -277,8 +277,8 @@
     /**
      * Close the current output stream.
      * <p>
-     * The <tt>Formatter</tt>'s "tail" string is written to the stream before it
-     * is closed.  In addition, if the <tt>Formatter</tt>'s "head" string has not
+     * The {@code Formatter}'s "tail" string is written to the stream before it
+     * is closed.  In addition, if the {@code Formatter}'s "head" string has not
      * yet been written to the stream, it will be written before the
      * "tail" string.
      *
--- a/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/GetPropertyAction.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/GetPropertyAction.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,7 +28,7 @@
 import java.security.PrivilegedAction;
 
 /**
- * Utility class to be used by the method <tt>AccessControler.doPrivileged</tt>
+ * Utility class to be used by the method {@code AccessControler.doPrivileged}
  * to get a system property.
  *
  * @since 1.5
--- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/util/EnvHelp.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/remote/util/EnvHelp.java	Mon Aug 10 14:05:37 2015 +0300
@@ -177,7 +177,7 @@
      *     The ClassLoader object found in <var>env</var> for
      *     <code>jmx.remote.default.class.loader</code>, if any.
      * </li>
-     * <li>The <tt>Thread.currentThread().getContextClassLoader()</tt>
+     * <li>The {@code Thread.currentThread().getContextClassLoader()}
      *     otherwise.
      * </li>
      * </ul>
--- a/jdk/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -35,13 +35,13 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getClassLoadingMXBean} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>}.
+ * platform MBeanServer}.
  *
- * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
- * the class loading system within an <tt>MBeanServer</tt> is:
+ * <p>The {@code ObjectName} for uniquely identifying the MXBean for
+ * the class loading system within an {@code MBeanServer} is:
  * <blockquote>
  * {@link ManagementFactory#CLASS_LOADING_MXBEAN_NAME
- *        <tt>java.lang:type=ClassLoading</tt>}
+ *        java.lang:type=ClassLoading}
  * </blockquote>
  *
  * It can be obtained by calling the
@@ -86,8 +86,8 @@
     /**
      * Tests if the verbose output for the class loading system is enabled.
      *
-     * @return <tt>true</tt> if the verbose output for the class loading
-     * system is enabled; <tt>false</tt> otherwise.
+     * @return {@code true} if the verbose output for the class loading
+     * system is enabled; {@code false} otherwise.
      */
     public boolean isVerbose();
 
@@ -102,8 +102,8 @@
      * Each invocation of this method enables or disables the verbose
      * output globally.
      *
-     * @param value <tt>true</tt> to enable the verbose output;
-     *              <tt>false</tt> to disable.
+     * @param value {@code true} to enable the verbose output;
+     *              {@code false} to disable.
      *
      * @exception  java.lang.SecurityException if a security manager
      *             exists and the caller does not have
--- a/jdk/src/java.management/share/classes/java/lang/management/CompilationMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/CompilationMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -35,13 +35,13 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getCompilationMXBean} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>} method.
+ * platform MBeanServer} method.
  *
- * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
+ * <p>The {@code ObjectName} for uniquely identifying the MXBean for
  * the compilation system within an MBeanServer is:
  * <blockquote>
  *  {@link ManagementFactory#COMPILATION_MXBEAN_NAME
- *         <tt>java.lang:type=Compilation</tt>}
+ *         java.lang:type=Compilation}
  * </blockquote>
  *
  * It can be obtained by calling the
@@ -68,8 +68,8 @@
      * Tests if the Java virtual machine supports the monitoring of
      * compilation time.
      *
-     * @return <tt>true</tt> if the monitoring of compilation time is
-     * supported ; <tt>false</tt> otherwise.
+     * @return {@code true} if the monitoring of compilation time is
+     * supported; {@code false} otherwise.
      */
     public boolean isCompilationTimeMonitoringSupported();
 
--- a/jdk/src/java.management/share/classes/java/lang/management/GarbageCollectorMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/GarbageCollectorMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -39,13 +39,13 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getGarbageCollectorMXBeans} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>} method.
+ * platform MBeanServer} method.
  *
- * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
+ * <p>The {@code ObjectName} for uniquely identifying the MXBean for
  * a garbage collector within an MBeanServer is:
  * <blockquote>
  *   {@link ManagementFactory#GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE
- *    <tt>java.lang:type=GarbageCollector</tt>}<tt>,name=</tt><i>collector's name</i>
+ *    java.lang:type=GarbageCollector}{@code ,name=}<i>collector's name</i>
  * </blockquote>
  *
  * It can be obtained by calling the
@@ -68,7 +68,7 @@
 public interface GarbageCollectorMXBean extends MemoryManagerMXBean {
     /**
      * Returns the total number of collections that have occurred.
-     * This method returns <tt>-1</tt> if the collection count is undefined for
+     * This method returns {@code -1} if the collection count is undefined for
      * this collector.
      *
      * @return the total number of collections that have occurred.
@@ -77,7 +77,7 @@
 
     /**
      * Returns the approximate accumulated collection elapsed time
-     * in milliseconds.  This method returns <tt>-1</tt> if the collection
+     * in milliseconds.  This method returns {@code -1} if the collection
      * elapsed time is undefined for this collector.
      * <p>
      * The Java virtual machine implementation may use a high resolution
--- a/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -43,7 +43,7 @@
  * two examples of ownable synchronizers provided by the platform.
  *
  * <h3><a name="MappedType">MXBean Mapping</a></h3>
- * <tt>LockInfo</tt> is mapped to a {@link CompositeData CompositeData}
+ * {@code LockInfo} is mapped to a {@link CompositeData CompositeData}
  * as specified in the {@link #from from} method.
  *
  * @see java.util.concurrent.locks.AbstractOwnableSynchronizer
@@ -59,7 +59,7 @@
     private int    identityHashCode;
 
     /**
-     * Constructs a <tt>LockInfo</tt> object.
+     * Constructs a {@code LockInfo} object.
      *
      * @param className the fully qualified name of the class of the lock object.
      * @param identityHashCode the {@link System#identityHashCode
@@ -112,11 +112,11 @@
      * </tr>
      * <tr>
      *   <td>className</td>
-     *   <td><tt>java.lang.String</tt></td>
+     *   <td>{@code java.lang.String}</td>
      * </tr>
      * <tr>
      *   <td>identityHashCode</td>
-     *   <td><tt>java.lang.Integer</tt></td>
+     *   <td>{@code java.lang.Integer}</td>
      * </tr>
      * </table>
      * </blockquote>
@@ -154,7 +154,7 @@
      * <pre>
      * lock.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(lock))
      * </pre></blockquote>
-     * where <tt>lock</tt> is the lock object.
+     * where {@code lock} is the lock object.
      *
      * @return the string representation of a lock.
      */
--- a/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java	Mon Aug 10 14:05:37 2015 +0300
@@ -116,7 +116,7 @@
  * <h4>2. Indirect access to an MXBean interface via MBeanServer</h4>
  * <ul>
  *     <li>Go through the platform {@code MBeanServer} to access MXBeans
- *         locally or a specific <tt>MBeanServerConnection</tt> to access
+ *         locally or a specific {@code MBeanServerConnection} to access
  *         MXBeans remotely.
  *         The attributes and operations of an MXBean use only
  *         <em>JMX open types</em> which include basic data types,
@@ -209,17 +209,17 @@
  * <tr>
  * <td> {@link GarbageCollectorMXBean} </td>
  * <td> {@link #GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE
- *             java.lang:type=GarbageCollector}<tt>,name=</tt><i>collector's name</i></td>
+ *             java.lang:type=GarbageCollector}{@code ,name=}<i>collector's name</i></td>
  * </tr>
  * <tr>
  * <td> {@link MemoryManagerMXBean} </td>
  * <td> {@link #MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE
- *             java.lang:type=MemoryManager}<tt>,name=</tt><i>manager's name</i></td>
+ *             java.lang:type=MemoryManager}{@code ,name=}<i>manager's name</i></td>
  * </tr>
  * <tr>
  * <td> {@link MemoryPoolMXBean} </td>
  * <td> {@link #MEMORY_POOL_MXBEAN_DOMAIN_TYPE
- *             java.lang:type=MemoryPool}<tt>,name=</tt><i>pool's name</i></td>
+ *             java.lang:type=MemoryPool}{@code ,name=}<i>pool's name</i></td>
  * </tr>
  * <tr>
  * <td> {@link BufferPoolMXBean} </td>
@@ -243,72 +243,72 @@
 
     /**
      * String representation of the
-     * <tt>ObjectName</tt> for the {@link ClassLoadingMXBean}.
+     * {@code ObjectName} for the {@link ClassLoadingMXBean}.
      */
     public final static String CLASS_LOADING_MXBEAN_NAME =
         "java.lang:type=ClassLoading";
 
     /**
      * String representation of the
-     * <tt>ObjectName</tt> for the {@link CompilationMXBean}.
+     * {@code ObjectName} for the {@link CompilationMXBean}.
      */
     public final static String COMPILATION_MXBEAN_NAME =
         "java.lang:type=Compilation";
 
     /**
      * String representation of the
-     * <tt>ObjectName</tt> for the {@link MemoryMXBean}.
+     * {@code ObjectName} for the {@link MemoryMXBean}.
      */
     public final static String MEMORY_MXBEAN_NAME =
         "java.lang:type=Memory";
 
     /**
      * String representation of the
-     * <tt>ObjectName</tt> for the {@link OperatingSystemMXBean}.
+     * {@code ObjectName} for the {@link OperatingSystemMXBean}.
      */
     public final static String OPERATING_SYSTEM_MXBEAN_NAME =
         "java.lang:type=OperatingSystem";
 
     /**
      * String representation of the
-     * <tt>ObjectName</tt> for the {@link RuntimeMXBean}.
+     * {@code ObjectName} for the {@link RuntimeMXBean}.
      */
     public final static String RUNTIME_MXBEAN_NAME =
         "java.lang:type=Runtime";
 
     /**
      * String representation of the
-     * <tt>ObjectName</tt> for the {@link ThreadMXBean}.
+     * {@code ObjectName} for the {@link ThreadMXBean}.
      */
     public final static String THREAD_MXBEAN_NAME =
         "java.lang:type=Threading";
 
     /**
      * The domain name and the type key property in
-     * the <tt>ObjectName</tt> for a {@link GarbageCollectorMXBean}.
-     * The unique <tt>ObjectName</tt> for a <tt>GarbageCollectorMXBean</tt>
+     * the {@code ObjectName} for a {@link GarbageCollectorMXBean}.
+     * The unique {@code ObjectName} for a {@code GarbageCollectorMXBean}
      * can be formed by appending this string with
-     * "<tt>,name=</tt><i>collector's name</i>".
+     * "{@code ,name=}<i>collector's name</i>".
      */
     public final static String GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE =
         "java.lang:type=GarbageCollector";
 
     /**
      * The domain name and the type key property in
-     * the <tt>ObjectName</tt> for a {@link MemoryManagerMXBean}.
-     * The unique <tt>ObjectName</tt> for a <tt>MemoryManagerMXBean</tt>
+     * the {@code ObjectName} for a {@link MemoryManagerMXBean}.
+     * The unique {@code ObjectName} for a {@code MemoryManagerMXBean}
      * can be formed by appending this string with
-     * "<tt>,name=</tt><i>manager's name</i>".
+     * "{@code ,name=}<i>manager's name</i>".
      */
     public final static String MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE=
         "java.lang:type=MemoryManager";
 
     /**
      * The domain name and the type key property in
-     * the <tt>ObjectName</tt> for a {@link MemoryPoolMXBean}.
-     * The unique <tt>ObjectName</tt> for a <tt>MemoryPoolMXBean</tt>
+     * the {@code ObjectName} for a {@link MemoryPoolMXBean}.
+     * The unique {@code ObjectName} for a {@code MemoryPoolMXBean}
      * can be formed by appending this string with
-     * <tt>,name=</tt><i>pool's name</i>.
+     * {@code ,name=}<i>pool's name</i>.
      */
     public final static String MEMORY_POOL_MXBEAN_DOMAIN_TYPE=
         "java.lang:type=MemoryPool";
@@ -357,11 +357,11 @@
 
     /**
      * Returns the managed bean for the compilation system of
-     * the Java virtual machine.  This method returns <tt>null</tt>
+     * the Java virtual machine.  This method returns {@code null}
      * if the Java virtual machine has no compilation system.
      *
      * @return a {@link CompilationMXBean} object for the Java virtual
-     *   machine or <tt>null</tt> if the Java virtual machine has
+     *   machine or {@code null} if the Java virtual machine has
      *   no compilation system.
      */
     public static CompilationMXBean getCompilationMXBean() {
@@ -385,7 +385,7 @@
      * The Java virtual machine can have one or more memory pools.
      * It may add or remove memory pools during execution.
      *
-     * @return a list of <tt>MemoryPoolMXBean</tt> objects.
+     * @return a list of {@code MemoryPoolMXBean} objects.
      *
      */
     public static List<MemoryPoolMXBean> getMemoryPoolMXBeans() {
@@ -398,7 +398,7 @@
      * The Java virtual machine can have one or more memory managers.
      * It may add or remove memory managers during execution.
      *
-     * @return a list of <tt>MemoryManagerMXBean</tt> objects.
+     * @return a list of {@code MemoryManagerMXBean} objects.
      *
      */
     public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() {
@@ -410,11 +410,11 @@
      * Returns a list of {@link GarbageCollectorMXBean} objects
      * in the Java virtual machine.
      * The Java virtual machine may have one or more
-     * <tt>GarbageCollectorMXBean</tt> objects.
-     * It may add or remove <tt>GarbageCollectorMXBean</tt>
+     * {@code GarbageCollectorMXBean} objects.
+     * It may add or remove {@code GarbageCollectorMXBean}
      * during execution.
      *
-     * @return a list of <tt>GarbageCollectorMXBean</tt> objects.
+     * @return a list of {@code GarbageCollectorMXBean} objects.
      *
      */
     public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() {
@@ -485,21 +485,21 @@
      * Returns a proxy for a platform MXBean interface of a
      * given <a href="#MXBeanNames">MXBean name</a>
      * that forwards its method calls through the given
-     * <tt>MBeanServerConnection</tt>.
+     * {@code MBeanServerConnection}.
      *
      * <p>This method is equivalent to:
      * <blockquote>
      * {@link java.lang.reflect.Proxy#newProxyInstance
-     *        Proxy.newProxyInstance}<tt>(mxbeanInterface.getClassLoader(),
-     *        new Class[] { mxbeanInterface }, handler)</tt>
+     *        Proxy.newProxyInstance}{@code (mxbeanInterface.getClassLoader(),
+     *        new Class[] { mxbeanInterface }, handler)}
      * </blockquote>
      *
-     * where <tt>handler</tt> is an {@link java.lang.reflect.InvocationHandler
+     * where {@code handler} is an {@link java.lang.reflect.InvocationHandler
      * InvocationHandler} to which method invocations to the MXBean interface
-     * are dispatched. This <tt>handler</tt> converts an input parameter
+     * are dispatched. This {@code handler} converts an input parameter
      * from an MXBean data type to its mapped open type before forwarding
-     * to the <tt>MBeanServer</tt> and converts a return value from
-     * an MXBean method call through the <tt>MBeanServer</tt>
+     * to the {@code MBeanServer} and converts a return value from
+     * an MXBean method call through the {@code MBeanServer}
      * from an open type to the corresponding return type declared in
      * the MXBean interface.
      *
@@ -507,7 +507,7 @@
      * If the MXBean is a notification emitter (i.e.,
      * it implements
      * {@link javax.management.NotificationEmitter NotificationEmitter}),
-     * both the <tt>mxbeanInterface</tt> and <tt>NotificationEmitter</tt>
+     * both the {@code mxbeanInterface} and {@code NotificationEmitter}
      * will be implemented by this proxy.
      *
      * <p>
@@ -516,12 +516,12 @@
      * <li>Using an MXBean proxy is a convenience remote access to
      * a platform MXBean of a running virtual machine.  All method
      * calls to the MXBean proxy are forwarded to an
-     * <tt>MBeanServerConnection</tt> where
+     * {@code MBeanServerConnection} where
      * {@link java.io.IOException IOException} may be thrown
      * when the communication problem occurs with the connector server.
      * An application remotely accesses the platform MXBeans using
-     * proxy should prepare to catch <tt>IOException</tt> as if
-     * accessing with the <tt>MBeanServerConnector</tt> interface.</li>
+     * proxy should prepare to catch {@code IOException} as if
+     * accessing with the {@code MBeanServerConnector} interface.</li>
      *
      * <li>When a client application is designed to remotely access MXBeans
      * for a running virtual machine whose version is different than
@@ -537,15 +537,15 @@
      * {@link javax.management.MBeanServerInvocationHandler#newProxyInstance
      * newProxyInstance} method cannot be used to create
      * a proxy for a platform MXBean. The proxy object created
-     * by <tt>MBeanServerInvocationHandler</tt> does not handle
+     * by {@code MBeanServerInvocationHandler} does not handle
      * the properties of the platform MXBeans described in
      * the <a href="#MXBean">class specification</a>.
      *</li>
      * </ol>
      *
-     * @param connection the <tt>MBeanServerConnection</tt> to forward to.
+     * @param connection the {@code MBeanServerConnection} to forward to.
      * @param mxbeanName the name of a platform MXBean within
-     * <tt>connection</tt> to forward to. <tt>mxbeanName</tt> must be
+     * {@code connection} to forward to. {@code mxbeanName} must be
      * in the format of {@link ObjectName ObjectName}.
      * @param mxbeanInterface the MXBean interface to be implemented
      * by the proxy.
@@ -554,22 +554,22 @@
      * @return a proxy for a platform MXBean interface of a
      * given <a href="#MXBeanNames">MXBean name</a>
      * that forwards its method calls through the given
-     * <tt>MBeanServerConnection</tt>, or {@code null} if not exist.
+     * {@code MBeanServerConnection}, or {@code null} if not exist.
      *
      * @throws IllegalArgumentException if
      * <ul>
-     * <li><tt>mxbeanName</tt> is not with a valid
+     * <li>{@code mxbeanName} is not with a valid
      *     {@link ObjectName ObjectName} format, or</li>
-     * <li>the named MXBean in the <tt>connection</tt> is
+     * <li>the named MXBean in the {@code connection} is
      *     not a MXBean provided by the platform, or</li>
      * <li>the named MXBean is not registered in the
-     *     <tt>MBeanServerConnection</tt>, or</li>
+     *     {@code MBeanServerConnection}, or</li>
      * <li>the named MXBean is not an instance of the given
-     *     <tt>mxbeanInterface</tt></li>
+     *     {@code mxbeanInterface}</li>
      * </ul>
      *
      * @throws java.io.IOException if a communication problem
-     * occurred when accessing the <tt>MBeanServerConnection</tt>.
+     * occurred when accessing the {@code MBeanServerConnection}.
      */
     public static <T> T
         newPlatformMXBeanProxy(MBeanServerConnection connection,
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -37,13 +37,13 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getMemoryMXBean} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>} method.
+ * platform MBeanServer} method.
  *
- * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
+ * <p>The {@code ObjectName} for uniquely identifying the MXBean for
  * the memory system within an MBeanServer is:
  * <blockquote>
  *    {@link ManagementFactory#MEMORY_MXBEAN_NAME
- *           <tt>java.lang:type=Memory</tt>}
+ *           java.lang:type=Memory}
  * </blockquote>
  *
  * It can be obtained by calling the
@@ -133,7 +133,7 @@
  *
  * <h3>Notifications</h3>
  *
- * <p>This <tt>MemoryMXBean</tt> is a
+ * <p>This {@code MemoryMXBean} is a
  * {@link javax.management.NotificationEmitter NotificationEmitter}
  * that emits two types of memory {@link javax.management.Notification
  * notifications} if any one of the memory pools
@@ -164,20 +164,20 @@
  * user data} is set to a {@link CompositeData CompositeData}
  * that represents a {@link MemoryNotificationInfo} object
  * containing information about the memory pool when the notification
- * was constructed. The <tt>CompositeData</tt> contains the attributes
+ * was constructed. The {@code CompositeData} contains the attributes
  * as described in {@link MemoryNotificationInfo#from
  * MemoryNotificationInfo}.
  *
  * <hr>
  * <h3>NotificationEmitter</h3>
- * The <tt>MemoryMXBean</tt> object returned by
+ * The {@code MemoryMXBean} object returned by
  * {@link ManagementFactory#getMemoryMXBean} implements
  * the {@link javax.management.NotificationEmitter NotificationEmitter}
  * interface that allows a listener to be registered within the
- * <tt>MemoryMXBean</tt> as a notification listener.
+ * {@code MemoryMXBean} as a notification listener.
  *
- * Below is an example code that registers a <tt>MyListener</tt> to handle
- * notification emitted by the <tt>MemoryMXBean</tt>.
+ * Below is an example code that registers a {@code MyListener} to handle
+ * notification emitted by the {@code MemoryMXBean}.
  *
  * <blockquote><pre>
  * class MyListener implements javax.management.NotificationListener {
@@ -215,10 +215,10 @@
     /**
      * Returns the current memory usage of the heap that
      * is used for object allocation.  The heap consists
-     * of one or more memory pools.  The <tt>used</tt>
-     * and <tt>committed</tt> size of the returned memory
+     * of one or more memory pools.  The {@code used}
+     * and {@code committed} size of the returned memory
      * usage is the sum of those values of all heap memory pools
-     * whereas the <tt>init</tt> and <tt>max</tt> size of the
+     * whereas the {@code init} and {@code max} size of the
      * returned memory usage represents the setting of the heap
      * memory which may not be the sum of those of all heap
      * memory pools.
@@ -229,8 +229,8 @@
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>MemoryUsage</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in
+     * The mapped type of {@code MemoryUsage} is
+     * {@code CompositeData} with attributes as specified in
      * {@link MemoryUsage#from MemoryUsage}.
      *
      * @return a {@link MemoryUsage} object representing
@@ -242,18 +242,18 @@
      * Returns the current memory usage of non-heap memory that
      * is used by the Java virtual machine.
      * The non-heap memory consists of one or more memory pools.
-     * The <tt>used</tt> and <tt>committed</tt> size of the
+     * The {@code used} and {@code committed} size of the
      * returned memory usage is the sum of those values of
-     * all non-heap memory pools whereas the <tt>init</tt>
-     * and <tt>max</tt> size of the returned memory usage
+     * all non-heap memory pools whereas the {@code init}
+     * and {@code max} size of the returned memory usage
      * represents the setting of the non-heap
      * memory which may not be the sum of those of all non-heap
      * memory pools.
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>MemoryUsage</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in
+     * The mapped type of {@code MemoryUsage} is
+     * {@code CompositeData} with attributes as specified in
      * {@link MemoryUsage#from MemoryUsage}.
      *
      * @return a {@link MemoryUsage} object representing
@@ -264,8 +264,8 @@
     /**
      * Tests if verbose output for the memory system is enabled.
      *
-     * @return <tt>true</tt> if verbose output for the memory
-     * system is enabled; <tt>false</tt> otherwise.
+     * @return {@code true} if verbose output for the memory
+     * system is enabled; {@code false} otherwise.
      */
     public boolean isVerbose();
 
@@ -280,8 +280,8 @@
      * Each invocation of this method enables or disables verbose
      * output globally.
      *
-     * @param value <tt>true</tt> to enable verbose output;
-     *              <tt>false</tt> to disable.
+     * @param value {@code true} to enable verbose output;
+     *              {@code false} to disable.
      *
      * @exception  java.lang.SecurityException if a security manager
      *             exists and the caller does not have
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryManagerMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryManagerMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -36,13 +36,13 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getMemoryManagerMXBeans} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>} method.
+ * platform MBeanServer} method.
  *
- * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
+ * <p>The {@code ObjectName} for uniquely identifying the MXBean for
  * a memory manager within an MBeanServer is:
  * <blockquote>
  *   {@link ManagementFactory#MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE
- *    <tt>java.lang:type=MemoryManager</tt>}<tt>,name=</tt><i>manager's name</i>
+ *    java.lang:type=MemoryManager}{@code ,name=}<i>manager's name</i>
  * </blockquote>
  *
  * It can be obtained by calling the
@@ -72,16 +72,16 @@
      * machine.  A memory manager becomes invalid once the Java virtual
      * machine removes it from the memory system.
      *
-     * @return <tt>true</tt> if the memory manager is valid in the
+     * @return {@code true} if the memory manager is valid in the
      *               Java virtual machine;
-     *         <tt>false</tt> otherwise.
+     *         {@code false} otherwise.
      */
     public boolean isValid();
 
     /**
      * Returns the name of memory pools that this memory manager manages.
      *
-     * @return an array of <tt>String</tt> objects, each is
+     * @return an array of {@code String} objects, each is
      * the name of a memory pool that this memory manager manages.
      */
     public String[] getMemoryPoolNames();
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -53,12 +53,12 @@
  *
  * <p>
  * A {@link CompositeData CompositeData} representing
- * the <tt>MemoryNotificationInfo</tt> object
+ * the {@code MemoryNotificationInfo} object
  * is stored in the
  * {@link javax.management.Notification#setUserData user data}
  * of a {@link javax.management.Notification notification}.
  * The {@link #from from} method is provided to convert from
- * a <tt>CompositeData</tt> to a <tt>MemoryNotificationInfo</tt>
+ * a {@code CompositeData} to a {@code MemoryNotificationInfo}
  * object. For example:
  *
  * <blockquote><pre>
@@ -78,7 +78,7 @@
  * </pre></blockquote>
  *
  * <p>
- * The types of notifications emitted by <tt>MemoryMXBean</tt> are:
+ * The types of notifications emitted by {@code MemoryMXBean} are:
  * <ul>
  *   <li>A {@link #MEMORY_THRESHOLD_EXCEEDED
  *       usage threshold exceeded notification}.
@@ -119,7 +119,7 @@
      * further notification until the memory usage has returned
      * to become less than the usage threshold value.
      * The value of this notification type is
-     * <tt>java.management.memory.threshold.exceeded</tt>.
+     * {@code java.management.memory.threshold.exceeded}.
      */
     public static final String MEMORY_THRESHOLD_EXCEEDED =
         "java.management.memory.threshold.exceeded";
@@ -133,13 +133,13 @@
      * memory pool.
      * This notification is emitted by {@link MemoryMXBean}.
      * The value of this notification type is
-     * <tt>java.management.memory.collection.threshold.exceeded</tt>.
+     * {@code java.management.memory.collection.threshold.exceeded}.
      */
     public static final String MEMORY_COLLECTION_THRESHOLD_EXCEEDED =
         "java.management.memory.collection.threshold.exceeded";
 
     /**
-     * Constructs a <tt>MemoryNotificationInfo</tt> object.
+     * Constructs a {@code MemoryNotificationInfo} object.
      *
      * @param poolName The name of the memory pool which triggers this notification.
      * @param usage Memory usage of the memory pool.
@@ -207,9 +207,9 @@
     }
 
     /**
-     * Returns a <tt>MemoryNotificationInfo</tt> object represented by the
-     * given <tt>CompositeData</tt>.
-     * The given <tt>CompositeData</tt> must contain
+     * Returns a {@code MemoryNotificationInfo} object represented by the
+     * given {@code CompositeData}.
+     * The given {@code CompositeData} must contain
      * the following attributes:
      * <blockquote>
      * <table border summary="The attributes and the types the given CompositeData contains">
@@ -219,28 +219,28 @@
      * </tr>
      * <tr>
      *   <td>poolName</td>
-     *   <td><tt>java.lang.String</tt></td>
+     *   <td>{@code java.lang.String}</td>
      * </tr>
      * <tr>
      *   <td>usage</td>
-     *   <td><tt>javax.management.openmbean.CompositeData</tt></td>
+     *   <td>{@code javax.management.openmbean.CompositeData}</td>
      * </tr>
      * <tr>
      *   <td>count</td>
-     *   <td><tt>java.lang.Long</tt></td>
+     *   <td>{@code java.lang.Long}</td>
      * </tr>
      * </table>
      * </blockquote>
      *
-     * @param cd <tt>CompositeData</tt> representing a
-     *           <tt>MemoryNotificationInfo</tt>
+     * @param cd {@code CompositeData} representing a
+     *           {@code MemoryNotificationInfo}
      *
-     * @throws IllegalArgumentException if <tt>cd</tt> does not
-     *   represent a <tt>MemoryNotificationInfo</tt> object.
+     * @throws IllegalArgumentException if {@code cd} does not
+     *   represent a {@code MemoryNotificationInfo} object.
      *
-     * @return a <tt>MemoryNotificationInfo</tt> object represented
-     *         by <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>;
-     *         <tt>null</tt> otherwise.
+     * @return a {@code MemoryNotificationInfo} object represented
+     *         by {@code cd} if {@code cd} is not {@code null};
+     *         {@code null} otherwise.
      */
     public static MemoryNotificationInfo from(CompositeData cd) {
         if (cd == null) {
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -37,13 +37,13 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getMemoryPoolMXBeans} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>} method.
+ * platform MBeanServer} method.
  *
- * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
- * a memory pool within an <tt>MBeanServer</tt> is:
+ * <p>The {@code ObjectName} for uniquely identifying the MXBean for
+ * a memory pool within an {@code MBeanServer} is:
  * <blockquote>
  *    {@link ManagementFactory#MEMORY_POOL_MXBEAN_DOMAIN_TYPE
- *    <tt>java.lang:type=MemoryPool</tt>}<tt>,name=</tt><i>pool's name</i>
+ *    java.lang:type=MemoryPool}{@code ,name=}<i>pool's name</i>
  * </blockquote>
  *
  * It can be obtained by calling the
@@ -236,7 +236,7 @@
  *       Usage threshold notification will be emitted by {@link MemoryMXBean}.
  *       When the Java virtual machine detects that the memory usage of
  *       a memory pool has reached or exceeded the usage threshold
- *       the virtual machine will trigger the <tt>MemoryMXBean</tt> to emit an
+ *       the virtual machine will trigger the {@code MemoryMXBean} to emit an
  *       {@link MemoryNotificationInfo#MEMORY_THRESHOLD_EXCEEDED
  *       usage threshold exceeded notification}.
  *       Another usage threshold exceeded notification will not be
@@ -250,7 +250,7 @@
  *       listener notifies another thread to perform the actual action
  *       such as to redistribute outstanding tasks, stop receiving tasks,
  *       or resume receiving tasks.
- *       The <tt>handleNotification</tt> method should be designed to
+ *       The {@code handleNotification} method should be designed to
  *       do a very minimal amount of work and return without delay to avoid
  *       causing delay in delivering subsequent notifications.  Time-consuming
  *       actions should be performed by a separate thread.
@@ -290,7 +290,7 @@
  *       </pre>
  * <hr>
  *       <p>
- *       There is no guarantee about when the <tt>MemoryMXBean</tt> will emit
+ *       There is no guarantee about when the {@code MemoryMXBean} will emit
  *       a threshold notification and when the notification will be delivered.
  *       When a notification listener is invoked, the memory usage of
  *       the memory pool may have crossed the usage threshold more
@@ -374,8 +374,8 @@
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>MemoryType</tt> is <tt>String</tt>
-     * and the value is the name of the <tt>MemoryType</tt>.
+     * The mapped type of {@code MemoryType} is {@code String}
+     * and the value is the name of the {@code MemoryType}.
      *
      * @return the type of this memory pool.
      */
@@ -383,7 +383,7 @@
 
     /**
      * Returns an estimate of the memory usage of this memory pool.
-     * This method returns <tt>null</tt>
+     * This method returns {@code null}
      * if this memory pool is not valid (i.e. no longer exists).
      *
      * <p>
@@ -399,11 +399,11 @@
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>MemoryUsage</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in
+     * The mapped type of {@code MemoryUsage} is
+     * {@code CompositeData} with attributes as specified in
      * {@link MemoryUsage#from MemoryUsage}.
      *
-     * @return a {@link MemoryUsage} object; or <tt>null</tt> if
+     * @return a {@link MemoryUsage} object; or {@code null} if
      * this pool not valid.
      */
     public MemoryUsage getUsage();
@@ -411,17 +411,17 @@
     /**
      * Returns the peak memory usage of this memory pool since the
      * Java virtual machine was started or since the peak was reset.
-     * This method returns <tt>null</tt>
+     * This method returns {@code null}
      * if this memory pool is not valid (i.e. no longer exists).
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>MemoryUsage</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in
+     * The mapped type of {@code MemoryUsage} is
+     * {@code CompositeData} with attributes as specified in
      * {@link MemoryUsage#from MemoryUsage}.
      *
      * @return a {@link MemoryUsage} object representing the peak
-     * memory usage; or <tt>null</tt> if this pool is not valid.
+     * memory usage; or {@code null} if this pool is not valid.
      *
      */
     public MemoryUsage getPeakUsage();
@@ -441,9 +441,9 @@
      * machine.  A memory pool becomes invalid once the Java virtual
      * machine removes it from the memory system.
      *
-     * @return <tt>true</tt> if the memory pool is valid in the running
+     * @return {@code true} if the memory pool is valid in the running
      *              Java virtual machine;
-     *         <tt>false</tt> otherwise.
+     *         {@code false} otherwise.
      */
     public boolean isValid();
 
@@ -451,7 +451,7 @@
      * Returns the name of memory managers that manages this memory pool.
      * Each memory pool will be managed by at least one memory manager.
      *
-     * @return an array of <tt>String</tt> objects, each is the name of
+     * @return an array of {@code String} objects, each is the name of
      * a memory manager managing this memory pool.
      */
     public String[] getMemoryManagerNames();
@@ -472,7 +472,7 @@
     public long getUsageThreshold();
 
     /**
-     * Sets the threshold of this memory pool to the given <tt>threshold</tt>
+     * Sets the threshold of this memory pool to the given {@code threshold}
      * value if this memory pool supports the usage threshold.
      * The usage threshold crossing checking is enabled in this memory pool
      * if the threshold is set to a positive value.
@@ -481,7 +481,7 @@
      *
      * @param threshold the new threshold value in bytes. Must be non-negative.
      *
-     * @throws IllegalArgumentException if <tt>threshold</tt> is negative
+     * @throws IllegalArgumentException if {@code threshold} is negative
      *         or greater than the maximum amount of memory for
      *         this memory pool if defined.
      *
@@ -501,9 +501,9 @@
      * Tests if the memory usage of this memory pool
      * reaches or exceeds its usage threshold value.
      *
-     * @return <tt>true</tt> if the memory usage of
+     * @return {@code true} if the memory usage of
      * this memory pool reaches or exceeds the threshold value;
-     * <tt>false</tt> otherwise.
+     * {@code false} otherwise.
      *
      * @throws UnsupportedOperationException if this memory pool
      *         does not support a usage threshold.
@@ -525,8 +525,8 @@
     /**
      * Tests if this memory pool supports usage threshold.
      *
-     * @return <tt>true</tt> if this memory pool supports usage threshold;
-     * <tt>false</tt> otherwise.
+     * @return {@code true} if this memory pool supports usage threshold;
+     * {@code false} otherwise.
      */
     public boolean isUsageThresholdSupported();
 
@@ -547,7 +547,7 @@
 
     /**
      * Sets the collection usage threshold of this memory pool to
-     * the given <tt>threshold</tt> value.
+     * the given {@code threshold} value.
      * When this threshold is set to positive, the Java virtual machine
      * will check the memory usage at its best appropriate time after it has
      * expended effort in recycling unused objects in this memory pool.
@@ -560,7 +560,7 @@
      * @param threshold the new collection usage threshold value in bytes.
      *              Must be non-negative.
      *
-     * @throws IllegalArgumentException if <tt>threshold</tt> is negative
+     * @throws IllegalArgumentException if {@code threshold} is negative
      *         or greater than the maximum amount of memory for
      *         this memory pool if defined.
      *
@@ -585,10 +585,10 @@
      * machine to perform any garbage collection other than its normal
      * automatic memory management.
      *
-     * @return <tt>true</tt> if the memory usage of this memory pool
+     * @return {@code true} if the memory usage of this memory pool
      * reaches or exceeds the collection usage threshold value
      * in the most recent collection;
-     * <tt>false</tt> otherwise.
+     * {@code false} otherwise.
      *
      * @throws UnsupportedOperationException if this memory pool
      *         does not support a usage threshold.
@@ -617,27 +617,27 @@
      * This method does not request the Java virtual
      * machine to perform any garbage collection other than its normal
      * automatic memory management.
-     * This method returns <tt>null</tt> if the Java virtual
+     * This method returns {@code null} if the Java virtual
      * machine does not support this method.
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>MemoryUsage</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in
+     * The mapped type of {@code MemoryUsage} is
+     * {@code CompositeData} with attributes as specified in
      * {@link MemoryUsage#from MemoryUsage}.
      *
      * @return a {@link MemoryUsage} representing the memory usage of
      * this memory pool after the Java virtual machine most recently
      * expended effort in recycling unused objects;
-     * <tt>null</tt> if this method is not supported.
+     * {@code null} if this method is not supported.
      */
     public MemoryUsage getCollectionUsage();
 
     /**
      * Tests if this memory pool supports a collection usage threshold.
      *
-     * @return <tt>true</tt> if this memory pool supports the
-     * collection usage threshold; <tt>false</tt> otherwise.
+     * @return {@code true} if this memory pool supports the
+     * collection usage threshold; {@code false} otherwise.
      */
     public boolean isCollectionUsageThresholdSupported();
 }
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryType.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryType.java	Mon Aug 10 14:05:37 2015 +0300
@@ -62,8 +62,8 @@
     }
 
     /**
-     * Returns the string representation of this <tt>MemoryType</tt>.
-     * @return the string representation of this <tt>MemoryType</tt>.
+     * Returns the string representation of this {@code MemoryType}.
+     * @return the string representation of this {@code MemoryType}.
      */
     public String toString() {
         return description;
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java	Mon Aug 10 14:05:37 2015 +0300
@@ -29,50 +29,50 @@
 import sun.management.MemoryUsageCompositeData;
 
 /**
- * A <tt>MemoryUsage</tt> object represents a snapshot of memory usage.
- * Instances of the <tt>MemoryUsage</tt> class are usually constructed
+ * A {@code MemoryUsage} object represents a snapshot of memory usage.
+ * Instances of the {@code MemoryUsage} class are usually constructed
  * by methods that are used to obtain memory usage
  * information about individual memory pool of the Java virtual machine or
  * the heap or non-heap memory of the Java virtual machine as a whole.
  *
- * <p> A <tt>MemoryUsage</tt> object contains four values:
+ * <p> A {@code MemoryUsage} object contains four values:
  * <table summary="Describes the MemoryUsage object content">
  * <tr>
- * <td valign=top> <tt>init</tt> </td>
+ * <td valign=top> {@code init} </td>
  * <td valign=top> represents the initial amount of memory (in bytes) that
  *      the Java virtual machine requests from the operating system
  *      for memory management during startup.  The Java virtual machine
  *      may request additional memory from the operating system and
  *      may also release memory to the system over time.
- *      The value of <tt>init</tt> may be undefined.
+ *      The value of {@code init} may be undefined.
  * </td>
  * </tr>
  * <tr>
- * <td valign=top> <tt>used</tt> </td>
+ * <td valign=top> {@code used} </td>
  * <td valign=top> represents the amount of memory currently used (in bytes).
  * </td>
  * </tr>
  * <tr>
- * <td valign=top> <tt>committed</tt> </td>
+ * <td valign=top> {@code committed} </td>
  * <td valign=top> represents the amount of memory (in bytes) that is
  *      guaranteed to be available for use by the Java virtual machine.
  *      The amount of committed memory may change over time (increase
  *      or decrease).  The Java virtual machine may release memory to
- *      the system and <tt>committed</tt> could be less than <tt>init</tt>.
- *      <tt>committed</tt> will always be greater than
- *      or equal to <tt>used</tt>.
+ *      the system and {@code committed} could be less than {@code init}.
+ *      {@code committed} will always be greater than
+ *      or equal to {@code used}.
  * </td>
  * </tr>
  * <tr>
- * <td valign=top> <tt>max</tt> </td>
+ * <td valign=top> {@code max} </td>
  * <td valign=top> represents the maximum amount of memory (in bytes)
  *      that can be used for memory management. Its value may be undefined.
  *      The maximum amount of memory may change over time if defined.
  *      The amount of used and committed memory will always be less than
- *      or equal to <tt>max</tt> if <tt>max</tt> is defined.
+ *      or equal to {@code max} if {@code max} is defined.
  *      A memory allocation may fail if it attempts to increase the
- *      used memory such that <tt>used &gt; committed</tt> even
- *      if <tt>used &lt;= max</tt> would still be true (for example,
+ *      used memory such that {@code used > committed} even
+ *      if {@code used <= max} would still be true (for example,
  *      when the system is low on virtual memory).
  * </td>
  * </tr>
@@ -97,7 +97,7 @@
  * </pre>
  *
  * <h3>MXBean Mapping</h3>
- * <tt>MemoryUsage</tt> is mapped to a {@link CompositeData CompositeData}
+ * {@code MemoryUsage} is mapped to a {@link CompositeData CompositeData}
  * with attributes as specified in the {@link #from from} method.
  *
  * @author   Mandy Chung
@@ -110,26 +110,26 @@
     private final long max;
 
     /**
-     * Constructs a <tt>MemoryUsage</tt> object.
+     * Constructs a {@code MemoryUsage} object.
      *
      * @param init      the initial amount of memory in bytes that
      *                  the Java virtual machine allocates;
-     *                  or <tt>-1</tt> if undefined.
+     *                  or {@code -1} if undefined.
      * @param used      the amount of used memory in bytes.
      * @param committed the amount of committed memory in bytes.
      * @param max       the maximum amount of memory in bytes that
-     *                  can be used; or <tt>-1</tt> if undefined.
+     *                  can be used; or {@code -1} if undefined.
      *
      * @throws IllegalArgumentException if
      * <ul>
-     * <li> the value of <tt>init</tt> or <tt>max</tt> is negative
-     *      but not <tt>-1</tt>; or</li>
-     * <li> the value of <tt>used</tt> or <tt>committed</tt> is negative;
+     * <li> the value of {@code init} or {@code max} is negative
+     *      but not {@code -1}; or</li>
+     * <li> the value of {@code used} or {@code committed} is negative;
      *      or</li>
-     * <li> <tt>used</tt> is greater than the value of <tt>committed</tt>;
+     * <li> {@code used} is greater than the value of {@code committed};
      *      or</li>
-     * <li> <tt>committed</tt> is greater than the value of <tt>max</tt>
-     *      <tt>max</tt> if defined.</li>
+     * <li> {@code committed} is greater than the value of {@code max}
+     *      {@code max} if defined.</li>
      * </ul>
      */
     public MemoryUsage(long init,
@@ -168,7 +168,7 @@
     }
 
     /**
-     * Constructs a <tt>MemoryUsage</tt> object from a
+     * Constructs a {@code MemoryUsage} object from a
      * {@link CompositeData CompositeData}.
      */
     private MemoryUsage(CompositeData cd) {
@@ -184,10 +184,10 @@
     /**
      * Returns the amount of memory in bytes that the Java virtual machine
      * initially requests from the operating system for memory management.
-     * This method returns <tt>-1</tt> if the initial memory size is undefined.
+     * This method returns {@code -1} if the initial memory size is undefined.
      *
      * @return the initial size of memory in bytes;
-     * <tt>-1</tt> if undefined.
+     * {@code -1} if undefined.
      */
     public long getInit() {
         return init;
@@ -217,7 +217,7 @@
 
     /**
      * Returns the maximum amount of memory in bytes that can be
-     * used for memory management.  This method returns <tt>-1</tt>
+     * used for memory management.  This method returns {@code -1}
      * if the maximum memory size is undefined.
      *
      * <p> This amount of memory is not guaranteed to be available
@@ -227,7 +227,7 @@
      * maximum size.
      *
      * @return the maximum amount of memory in bytes;
-     * <tt>-1</tt> if undefined.
+     * {@code -1} if undefined.
      */
     public long getMax() {
         return max;
@@ -247,8 +247,8 @@
     }
 
     /**
-     * Returns a <tt>MemoryUsage</tt> object represented by the
-     * given <tt>CompositeData</tt>. The given <tt>CompositeData</tt>
+     * Returns a {@code MemoryUsage} object represented by the
+     * given {@code CompositeData}. The given {@code CompositeData}
      * must contain the following attributes:
      *
      * <blockquote>
@@ -259,32 +259,32 @@
      * </tr>
      * <tr>
      *   <td>init</td>
-     *   <td><tt>java.lang.Long</tt></td>
+     *   <td>{@code java.lang.Long}</td>
      * </tr>
      * <tr>
      *   <td>used</td>
-     *   <td><tt>java.lang.Long</tt></td>
+     *   <td>{@code java.lang.Long}</td>
      * </tr>
      * <tr>
      *   <td>committed</td>
-     *   <td><tt>java.lang.Long</tt></td>
+     *   <td>{@code java.lang.Long}</td>
      * </tr>
      * <tr>
      *   <td>max</td>
-     *   <td><tt>java.lang.Long</tt></td>
+     *   <td>{@code java.lang.Long}</td>
      * </tr>
      * </table>
      * </blockquote>
      *
-     * @param cd <tt>CompositeData</tt> representing a <tt>MemoryUsage</tt>
+     * @param cd {@code CompositeData} representing a {@code MemoryUsage}
      *
-     * @throws IllegalArgumentException if <tt>cd</tt> does not
-     *   represent a <tt>MemoryUsage</tt> with the attributes described
+     * @throws IllegalArgumentException if {@code cd} does not
+     *   represent a {@code MemoryUsage} with the attributes described
      *   above.
      *
-     * @return a <tt>MemoryUsage</tt> object represented by <tt>cd</tt>
-     *         if <tt>cd</tt> is not <tt>null</tt>;
-     *         <tt>null</tt> otherwise.
+     * @return a {@code MemoryUsage} object represented by {@code cd}
+     *         if {@code cd} is not {@code null};
+     *         {@code null} otherwise.
      */
     public static MemoryUsage from(CompositeData cd) {
         if (cd == null) {
--- a/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -33,7 +33,7 @@
  * when entering a synchronization block or method on that object.
  *
  * <h3>MXBean Mapping</h3>
- * <tt>MonitorInfo</tt> is mapped to a {@link CompositeData CompositeData}
+ * {@code MonitorInfo} is mapped to a {@link CompositeData CompositeData}
  * with attributes as specified in
  * the {@link #from from} method.
  *
@@ -46,7 +46,7 @@
     private StackTraceElement stackFrame;
 
     /**
-     * Construct a <tt>MonitorInfo</tt> object.
+     * Construct a {@code MonitorInfo} object.
      *
      * @param className the fully qualified name of the class of the lock object.
      * @param identityHashCode the {@link System#identityHashCode
@@ -55,9 +55,9 @@
      *                   was locked.
      * @param stackFrame the stack frame that locked the object monitor.
      * @throws IllegalArgumentException if
-     *    <tt>stackDepth</tt> &ge; 0 but <tt>stackFrame</tt> is <tt>null</tt>,
-     *    or <tt>stackDepth</tt> &lt; 0 but <tt>stackFrame</tt> is not
-     *       <tt>null</tt>.
+     *    {@code stackDepth} &ge; 0 but {@code stackFrame} is {@code null},
+     *    or {@code stackDepth} &lt; 0 but {@code stackFrame} is not
+     *       {@code null}.
      */
     public MonitorInfo(String className,
                        int identityHashCode,
@@ -78,7 +78,7 @@
 
     /**
      * Returns the depth in the stack trace where the object monitor
-     * was locked.  The depth is the index to the <tt>StackTraceElement</tt>
+     * was locked.  The depth is the index to the {@code StackTraceElement}
      * array returned in the {@link ThreadInfo#getStackTrace} method.
      *
      * @return the depth in the stack trace where the object monitor
@@ -91,17 +91,17 @@
     /**
      * Returns the stack frame that locked the object monitor.
      *
-     * @return <tt>StackTraceElement</tt> that locked the object monitor,
-     *         or <tt>null</tt> if not available.
+     * @return {@code StackTraceElement} that locked the object monitor,
+     *         or {@code null} if not available.
      */
     public StackTraceElement getLockedStackFrame() {
         return stackFrame;
     }
 
     /**
-     * Returns a <tt>MonitorInfo</tt> object represented by the
-     * given <tt>CompositeData</tt>.
-     * The given <tt>CompositeData</tt> must contain the following attributes
+     * Returns a {@code MonitorInfo} object represented by the
+     * given {@code CompositeData}.
+     * The given {@code CompositeData} must contain the following attributes
      * as well as the attributes specified in the
      * <a href="LockInfo.html#MappedType">
      * mapped type</a> for the {@link LockInfo} class:
@@ -113,28 +113,28 @@
      * </tr>
      * <tr>
      *   <td>lockedStackFrame</td>
-     *   <td><tt>CompositeData as specified in the
+     *   <td><code>CompositeData as specified in the
      *       <a href="ThreadInfo.html#StackTrace">stackTrace</a>
      *       attribute defined in the {@link ThreadInfo#from
      *       ThreadInfo.from} method.
-     *       </tt></td>
+     *       </code></td>
      * </tr>
      * <tr>
      *   <td>lockedStackDepth</td>
-     *   <td><tt>java.lang.Integer</tt></td>
+     *   <td>{@code java.lang.Integer}</td>
      * </tr>
      * </table>
      * </blockquote>
      *
-     * @param cd <tt>CompositeData</tt> representing a <tt>MonitorInfo</tt>
+     * @param cd {@code CompositeData} representing a {@code MonitorInfo}
      *
-     * @throws IllegalArgumentException if <tt>cd</tt> does not
-     *   represent a <tt>MonitorInfo</tt> with the attributes described
+     * @throws IllegalArgumentException if {@code cd} does not
+     *   represent a {@code MonitorInfo} with the attributes described
      *   above.
 
-     * @return a <tt>MonitorInfo</tt> object represented
-     *         by <tt>cd</tt> if <tt>cd</tt> is not <tt>null</tt>;
-     *         <tt>null</tt> otherwise.
+     * @return a {@code MonitorInfo} object represented
+     *         by {@code cd} if {@code cd} is not {@code null};
+     *         {@code null} otherwise.
      */
     public static MonitorInfo from(CompositeData cd) {
         if (cd == null) {
--- a/jdk/src/java.management/share/classes/java/lang/management/OperatingSystemMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/OperatingSystemMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -35,13 +35,13 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getOperatingSystemMXBean} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>} method.
+ * platform MBeanServer} method.
  *
- * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
+ * <p>The {@code ObjectName} for uniquely identifying the MXBean for
  * the operating system within an MBeanServer is:
  * <blockquote>
  *    {@link ManagementFactory#OPERATING_SYSTEM_MXBEAN_NAME
- *      <tt>java.lang:type=OperatingSystem</tt>}
+ *      java.lang:type=OperatingSystem}
  * </blockquote>
  *
  * It can be obtained by calling the
@@ -63,7 +63,7 @@
 public interface OperatingSystemMXBean extends PlatformManagedObject {
     /**
      * Returns the operating system name.
-     * This method is equivalent to <tt>System.getProperty("os.name")</tt>.
+     * This method is equivalent to {@code System.getProperty("os.name")}.
      *
      * @return the operating system name.
      *
@@ -78,7 +78,7 @@
 
     /**
      * Returns the operating system architecture.
-     * This method is equivalent to <tt>System.getProperty("os.arch")</tt>.
+     * This method is equivalent to {@code System.getProperty("os.arch")}.
      *
      * @return the operating system architecture.
      *
@@ -93,7 +93,7 @@
 
     /**
      * Returns the operating system version.
-     * This method is equivalent to <tt>System.getProperty("os.version")</tt>.
+     * This method is equivalent to {@code System.getProperty("os.version")}.
      *
      * @return the operating system version.
      *
--- a/jdk/src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,7 +28,7 @@
 /**
  * The management interface for the {@linkplain java.util.logging logging} facility.
  *
- * <p>There is a single global instance of the <tt>PlatformLoggingMXBean</tt>.
+ * <p>There is a single global instance of the {@code PlatformLoggingMXBean}.
  * The {@link java.lang.management.ManagementFactory#getPlatformMXBean(Class)
  * ManagementFactory.getPlatformMXBean} method can be used to obtain
  * the {@code PlatformLoggingMXBean} object as follows:
@@ -44,7 +44,7 @@
  *      {@link java.util.logging.LogManager#LOGGING_MXBEAN_NAME java.util.logging:type=Logging}
  * </pre>
  *
- * <p>The instance registered in the platform <tt>MBeanServer</tt> with
+ * <p>The instance registered in the platform {@code MBeanServer} with
  * this {@code ObjectName} implements all attributes defined by
  * {@link java.util.logging.LoggingMXBean}.
  *
--- a/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -35,13 +35,13 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getRuntimeMXBean} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>} method.
+ * platform MBeanServer} method.
  *
- * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
+ * <p>The {@code ObjectName} for uniquely identifying the MXBean for
  * the runtime system within an MBeanServer is:
  * <blockquote>
  *    {@link ManagementFactory#RUNTIME_MXBEAN_NAME
- *           <tt>java.lang:type=Runtime</tt>}
+ *           java.lang:type=Runtime}
  * </blockquote>
  *
  * It can be obtained by calling the
@@ -81,7 +81,7 @@
      *
      * @throws  java.lang.SecurityException
      *     if a security manager exists and its
-     *     <code>checkPropertiesAccess</code> method doesn't allow access
+     *     {@code checkPropertiesAccess} method doesn't allow access
      *     to this system property.
      * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
      * @see java.lang.System#getProperty
@@ -97,7 +97,7 @@
      *
      * @throws  java.lang.SecurityException
      *     if a security manager exists and its
-     *     <code>checkPropertiesAccess</code> method doesn't allow access
+     *     {@code checkPropertiesAccess} method doesn't allow access
      *     to this system property.
      * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
      * @see java.lang.System#getProperty
@@ -113,7 +113,7 @@
      *
      * @throws  java.lang.SecurityException
      *     if a security manager exists and its
-     *     <code>checkPropertiesAccess</code> method doesn't allow access
+     *     {@code checkPropertiesAccess} method doesn't allow access
      *     to this system property.
      * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
      * @see java.lang.System#getProperty
@@ -129,7 +129,7 @@
      *
      * @throws  java.lang.SecurityException
      *     if a security manager exists and its
-     *     <code>checkPropertiesAccess</code> method doesn't allow access
+     *     {@code checkPropertiesAccess} method doesn't allow access
      *     to this system property.
      * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
      * @see java.lang.System#getProperty
@@ -145,7 +145,7 @@
      *
      * @throws  java.lang.SecurityException
      *     if a security manager exists and its
-     *     <code>checkPropertiesAccess</code> method doesn't allow access
+     *     {@code checkPropertiesAccess} method doesn't allow access
      *     to this system property.
      * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
      * @see java.lang.System#getProperty
@@ -161,7 +161,7 @@
      *
      * @throws  java.lang.SecurityException
      *     if a security manager exists and its
-     *     <code>checkPropertiesAccess</code> method doesn't allow access
+     *     {@code checkPropertiesAccess} method doesn't allow access
      *     to this system property.
      * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
      * @see java.lang.System#getProperty
@@ -192,7 +192,7 @@
      *
      * @throws  java.lang.SecurityException
      *     if a security manager exists and its
-     *     <code>checkPropertiesAccess</code> method doesn't allow access
+     *     {@code checkPropertiesAccess} method doesn't allow access
      *     to this system property.
      * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
      * @see java.lang.System#getProperty
@@ -212,7 +212,7 @@
      *
      * @throws  java.lang.SecurityException
      *     if a security manager exists and its
-     *     <code>checkPropertiesAccess</code> method doesn't allow access
+     *     {@code checkPropertiesAccess} method doesn't allow access
      *     to this system property.
      * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
      * @see java.lang.System#getProperty
@@ -224,8 +224,8 @@
      * mechanism used by the bootstrap class loader to search for class
      * files.
      *
-     * @return <tt>true</tt> if the Java virtual machine supports the
-     * class path mechanism; <tt>false</tt> otherwise.
+     * @return {@code true} if the Java virtual machine supports the
+     * class path mechanism; {@code false} otherwise.
      */
     public boolean isBootClassPathSupported();
 
@@ -256,7 +256,7 @@
 
     /**
      * Returns the input arguments passed to the Java virtual machine
-     * which does not include the arguments to the <tt>main</tt> method.
+     * which does not include the arguments to the {@code main} method.
      * This method returns an empty list if there is no input argument
      * to the Java virtual machine.
      * <p>
@@ -272,9 +272,9 @@
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of {@code List<String>} is <tt>String[]</tt>.
+     * The mapped type of {@code List<String>} is {@code String[]}.
      *
-     * @return a list of <tt>String</tt> objects; each element
+     * @return a list of {@code String} objects; each element
      * is an argument passed to the Java virtual machine.
      *
      * @throws  java.lang.SecurityException
@@ -304,7 +304,7 @@
      * Returns a map of names and values of all system properties.
      * This method calls {@link System#getProperties} to get all
      * system properties.  Properties whose name or value is not
-     * a <tt>String</tt> are omitted.
+     * a {@code String} are omitted.
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
@@ -318,12 +318,12 @@
      *   <th>Item Type</th>
      *   </tr>
      * <tr>
-     *   <td><tt>key</tt></td>
-     *   <td><tt>String</tt></td>
+     *   <td>{@code key}</td>
+     *   <td>{@code String}</td>
      *   </tr>
      * <tr>
-     *   <td><tt>value</tt></td>
-     *   <td><tt>String</tt></td>
+     *   <td>{@code value}</td>
+     *   <td>{@code String}</td>
      *   </tr>
      * </table>
      * </blockquote>
@@ -332,7 +332,7 @@
      *
      * @throws  java.lang.SecurityException
      *     if a security manager exists and its
-     *     <code>checkPropertiesAccess</code> method doesn't allow access
+     *     {@code checkPropertiesAccess} method doesn't allow access
      *     to the system properties.
      */
     public java.util.Map<String, String> getSystemProperties();
--- a/jdk/src/java.management/share/classes/java/lang/management/ThreadMXBean.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/ThreadMXBean.java	Mon Aug 10 14:05:37 2015 +0300
@@ -37,13 +37,13 @@
  * that can be obtained by calling
  * the {@link ManagementFactory#getThreadMXBean} method or
  * from the {@link ManagementFactory#getPlatformMBeanServer
- * platform <tt>MBeanServer</tt>} method.
+ * platform MBeanServer} method.
  *
- * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
+ * <p>The {@code ObjectName} for uniquely identifying the MXBean for
  * the thread system within an MBeanServer is:
  * <blockquote>
  *    {@link ManagementFactory#THREAD_MXBEAN_NAME
- *           <tt>java.lang:type=Threading</tt>}
+ *           java.lang:type=Threading}
  * </blockquote>
  *
  * It can be obtained by calling the
@@ -88,7 +88,7 @@
  * When thread contention monitoring is enabled, the accumulated elapsed
  * time that the thread has blocked for synchronization or waited for
  * notification will be collected and returned in the
- * <a href="ThreadInfo.html#SyncStats"><tt>ThreadInfo</tt></a> object.
+ * <a href="ThreadInfo.html#SyncStats">{@code ThreadInfo}</a> object.
  * <p>
  * The {@link #isThreadContentionMonitoringSupported} method can be used to
  * determine if a Java virtual machine supports thread contention monitoring.
@@ -106,7 +106,7 @@
  * {@linkplain LockInfo <i>lock</i>} a thread is blocked to
  * acquire or waiting on and which locks the thread currently owns.
  * <p>
- * The <tt>ThreadMXBean</tt> interface provides the
+ * The {@code ThreadMXBean} interface provides the
  * {@link #findMonitorDeadlockedThreads} and
  * {@link #findDeadlockedThreads} methods to find deadlocks in
  * the running application.
@@ -158,7 +158,7 @@
      * Some threads included in the returned array
      * may have been terminated when this method returns.
      *
-     * @return an array of <tt>long</tt>, each is a thread ID.
+     * @return an array of {@code long}, each is a thread ID.
      *
      * @throws java.lang.SecurityException if a security manager
      *         exists and the caller does not have
@@ -168,34 +168,34 @@
 
     /**
      * Returns the thread info for a thread of the specified
-     * <tt>id</tt> with no stack trace.
+     * {@code id} with no stack trace.
      * This method is equivalent to calling:
      * <blockquote>
      *   {@link #getThreadInfo(long, int) getThreadInfo(id, 0);}
      * </blockquote>
      *
      * <p>
-     * This method returns a <tt>ThreadInfo</tt> object representing
+     * This method returns a {@code ThreadInfo} object representing
      * the thread information for the thread of the specified ID.
      * The stack trace, locked monitors, and locked synchronizers
-     * in the returned <tt>ThreadInfo</tt> object will
+     * in the returned {@code ThreadInfo} object will
      * be empty.
      *
      * If a thread of the given ID is not alive or does not exist,
-     * this method will return <tt>null</tt>.  A thread is alive if
+     * this method will return {@code null}.  A thread is alive if
      * it has been started and has not yet died.
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>ThreadInfo</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in the
+     * The mapped type of {@code ThreadInfo} is
+     * {@code CompositeData} with attributes as specified in the
      * {@link ThreadInfo#from ThreadInfo.from} method.
      *
      * @param id the thread ID of the thread. Must be positive.
      *
      * @return a {@link ThreadInfo} object for the thread of the given ID
      * with no stack trace, no locked monitor and no synchronizer info;
-     * <tt>null</tt> if the thread of the given ID is not alive or
+     * {@code null} if the thread of the given ID is not alive or
      * it does not exist.
      *
      * @throws IllegalArgumentException if {@code id <= 0}.
@@ -207,26 +207,26 @@
 
     /**
      * Returns the thread info for each thread
-     * whose ID is in the input array <tt>ids</tt> with no stack trace.
+     * whose ID is in the input array {@code ids} with no stack trace.
      * This method is equivalent to calling:
      * <blockquote><pre>
      *   {@link #getThreadInfo(long[], int) getThreadInfo}(ids, 0);
      * </pre></blockquote>
      *
      * <p>
-     * This method returns an array of the <tt>ThreadInfo</tt> objects.
+     * This method returns an array of the {@code ThreadInfo} objects.
      * The stack trace, locked monitors, and locked synchronizers
-     * in each <tt>ThreadInfo</tt> object will be empty.
+     * in each {@code ThreadInfo} object will be empty.
      *
      * If a thread of a given ID is not alive or does not exist,
      * the corresponding element in the returned array will
-     * contain <tt>null</tt>.  A thread is alive if
+     * contain {@code null}.  A thread is alive if
      * it has been started and has not yet died.
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>ThreadInfo</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in the
+     * The mapped type of {@code ThreadInfo} is
+     * {@code CompositeData} with attributes as specified in the
      * {@link ThreadInfo#from ThreadInfo.from} method.
      *
      * @param ids an array of thread IDs.
@@ -236,7 +236,7 @@
      * with no stack trace, no locked monitor and no synchronizer info.
      *
      * @throws IllegalArgumentException if any element in the input array
-     *         <tt>ids</tt> is {@code <= 0}.
+     *         {@code ids} is {@code <= 0}.
      * @throws java.lang.SecurityException if a security manager
      *         exists and the caller does not have
      *         ManagementPermission("monitor").
@@ -244,46 +244,46 @@
     public ThreadInfo[] getThreadInfo(long[] ids);
 
     /**
-     * Returns a thread info for a thread of the specified <tt>id</tt>,
+     * Returns a thread info for a thread of the specified {@code id},
      * with stack trace of a specified number of stack trace elements.
-     * The <tt>maxDepth</tt> parameter indicates the maximum number of
+     * The {@code maxDepth} parameter indicates the maximum number of
      * {@link StackTraceElement} to be retrieved from the stack trace.
-     * If <tt>maxDepth == Integer.MAX_VALUE</tt>, the entire stack trace of
+     * If {@code maxDepth == Integer.MAX_VALUE}, the entire stack trace of
      * the thread will be dumped.
-     * If <tt>maxDepth == 0</tt>, no stack trace of the thread
+     * If {@code maxDepth == 0}, no stack trace of the thread
      * will be dumped.
      * This method does not obtain the locked monitors and locked
      * synchronizers of the thread.
      * <p>
      * When the Java virtual machine has no stack trace information
-     * about a thread or <tt>maxDepth == 0</tt>,
+     * about a thread or {@code maxDepth == 0},
      * the stack trace in the
-     * <tt>ThreadInfo</tt> object will be an empty array of
-     * <tt>StackTraceElement</tt>.
+     * {@code ThreadInfo} object will be an empty array of
+     * {@code StackTraceElement}.
      *
      * <p>
      * If a thread of the given ID is not alive or does not exist,
-     * this method will return <tt>null</tt>.  A thread is alive if
+     * this method will return {@code null}.  A thread is alive if
      * it has been started and has not yet died.
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>ThreadInfo</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in the
+     * The mapped type of {@code ThreadInfo} is
+     * {@code CompositeData} with attributes as specified in the
      * {@link ThreadInfo#from ThreadInfo.from} method.
      *
      * @param id the thread ID of the thread. Must be positive.
      * @param maxDepth the maximum number of entries in the stack trace
-     * to be dumped. <tt>Integer.MAX_VALUE</tt> could be used to request
+     * to be dumped. {@code Integer.MAX_VALUE} could be used to request
      * the entire stack to be dumped.
      *
      * @return a {@link ThreadInfo} of the thread of the given ID
      * with no locked monitor and synchronizer info.
-     * <tt>null</tt> if the thread of the given ID is not alive or
+     * {@code null} if the thread of the given ID is not alive or
      * it does not exist.
      *
      * @throws IllegalArgumentException if {@code id <= 0}.
-     * @throws IllegalArgumentException if <tt>maxDepth is negative</tt>.
+     * @throws IllegalArgumentException if {@code maxDepth is negative}.
      * @throws java.lang.SecurityException if a security manager
      *         exists and the caller does not have
      *         ManagementPermission("monitor").
@@ -293,40 +293,40 @@
 
     /**
      * Returns the thread info for each thread
-     * whose ID is in the input array <tt>ids</tt>,
+     * whose ID is in the input array {@code ids},
      * with stack trace of a specified number of stack trace elements.
-     * The <tt>maxDepth</tt> parameter indicates the maximum number of
+     * The {@code maxDepth} parameter indicates the maximum number of
      * {@link StackTraceElement} to be retrieved from the stack trace.
-     * If <tt>maxDepth == Integer.MAX_VALUE</tt>, the entire stack trace of
+     * If {@code maxDepth == Integer.MAX_VALUE}, the entire stack trace of
      * the thread will be dumped.
-     * If <tt>maxDepth == 0</tt>, no stack trace of the thread
+     * If {@code maxDepth == 0}, no stack trace of the thread
      * will be dumped.
      * This method does not obtain the locked monitors and locked
      * synchronizers of the threads.
      * <p>
      * When the Java virtual machine has no stack trace information
-     * about a thread or <tt>maxDepth == 0</tt>,
+     * about a thread or {@code maxDepth == 0},
      * the stack trace in the
-     * <tt>ThreadInfo</tt> object will be an empty array of
-     * <tt>StackTraceElement</tt>.
+     * {@code ThreadInfo} object will be an empty array of
+     * {@code StackTraceElement}.
      * <p>
-     * This method returns an array of the <tt>ThreadInfo</tt> objects,
+     * This method returns an array of the {@code ThreadInfo} objects,
      * each is the thread information about the thread with the same index
-     * as in the <tt>ids</tt> array.
+     * as in the {@code ids} array.
      * If a thread of the given ID is not alive or does not exist,
-     * <tt>null</tt> will be set in the corresponding element
+     * {@code null} will be set in the corresponding element
      * in the returned array.  A thread is alive if
      * it has been started and has not yet died.
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>ThreadInfo</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in the
+     * The mapped type of {@code ThreadInfo} is
+     * {@code CompositeData} with attributes as specified in the
      * {@link ThreadInfo#from ThreadInfo.from} method.
      *
      * @param ids an array of thread IDs
      * @param maxDepth the maximum number of entries in the stack trace
-     * to be dumped. <tt>Integer.MAX_VALUE</tt> could be used to request
+     * to be dumped. {@code Integer.MAX_VALUE} could be used to request
      * the entire stack to be dumped.
      *
      * @return an array of the {@link ThreadInfo} objects, each containing
@@ -334,9 +334,9 @@
      * element of the input array of IDs with no locked monitor and
      * synchronizer info.
      *
-     * @throws IllegalArgumentException if <tt>maxDepth is negative</tt>.
+     * @throws IllegalArgumentException if {@code maxDepth is negative}.
      * @throws IllegalArgumentException if any element in the input array
-     *      <tt>ids</tt> is {@code <= 0}.
+     *      {@code ids} is {@code <= 0}.
      * @throws java.lang.SecurityException if a security manager
      *         exists and the caller does not have
      *         ManagementPermission("monitor").
@@ -348,17 +348,17 @@
      * Tests if the Java virtual machine supports thread contention monitoring.
      *
      * @return
-     *   <tt>true</tt>
+     *   {@code true}
      *     if the Java virtual machine supports thread contention monitoring;
-     *   <tt>false</tt> otherwise.
+     *   {@code false} otherwise.
      */
     public boolean isThreadContentionMonitoringSupported();
 
     /**
      * Tests if thread contention monitoring is enabled.
      *
-     * @return <tt>true</tt> if thread contention monitoring is enabled;
-     *         <tt>false</tt> otherwise.
+     * @return {@code true} if thread contention monitoring is enabled;
+     *         {@code false} otherwise.
      *
      * @throws java.lang.UnsupportedOperationException if the Java virtual
      * machine does not support thread contention monitoring.
@@ -371,8 +371,8 @@
      * Enables or disables thread contention monitoring.
      * Thread contention monitoring is disabled by default.
      *
-     * @param enable <tt>true</tt> to enable;
-     *               <tt>false</tt> to disable.
+     * @param enable {@code true} to enable;
+     *               {@code false} to disable.
      *
      * @throws java.lang.UnsupportedOperationException if the Java
      * virtual machine does not support thread contention monitoring.
@@ -401,7 +401,7 @@
      * </pre></blockquote>
      *
      * @return the total CPU time for the current thread if CPU time
-     * measurement is enabled; <tt>-1</tt> otherwise.
+     * measurement is enabled; {@code -1} otherwise.
      *
      * @throws java.lang.UnsupportedOperationException if the Java
      * virtual machine does not support CPU time measurement for
@@ -428,7 +428,7 @@
      * </pre></blockquote>
      *
      * @return the user-level CPU time for the current thread if CPU time
-     * measurement is enabled; <tt>-1</tt> otherwise.
+     * measurement is enabled; {@code -1} otherwise.
      *
      * @throws java.lang.UnsupportedOperationException if the Java
      * virtual machine does not support CPU time measurement for
@@ -451,8 +451,8 @@
      *
      * <p>
      * If the thread of the specified ID is not alive or does not exist,
-     * this method returns <tt>-1</tt>. If CPU time measurement
-     * is disabled, this method returns <tt>-1</tt>.
+     * this method returns {@code -1}. If CPU time measurement
+     * is disabled, this method returns {@code -1}.
      * A thread is alive if it has been started and has not yet died.
      * <p>
      * If CPU time measurement is enabled after the thread has started,
@@ -464,7 +464,7 @@
      * @return the total CPU time for a thread of the specified ID
      * if the thread of the specified ID exists, the thread is alive,
      * and CPU time measurement is enabled;
-     * <tt>-1</tt> otherwise.
+     * {@code -1} otherwise.
      *
      * @throws IllegalArgumentException if {@code id <= 0}.
      * @throws java.lang.UnsupportedOperationException if the Java
@@ -486,8 +486,8 @@
      *
      * <p>
      * If the thread of the specified ID is not alive or does not exist,
-     * this method returns <tt>-1</tt>. If CPU time measurement
-     * is disabled, this method returns <tt>-1</tt>.
+     * this method returns {@code -1}. If CPU time measurement
+     * is disabled, this method returns {@code -1}.
      * A thread is alive if it has been started and has not yet died.
      * <p>
      * If CPU time measurement is enabled after the thread has started,
@@ -499,7 +499,7 @@
      * @return the user-level CPU time for a thread of the specified ID
      * if the thread of the specified ID exists, the thread is alive,
      * and CPU time measurement is enabled;
-     * <tt>-1</tt> otherwise.
+     * {@code -1} otherwise.
      *
      * @throws IllegalArgumentException if {@code id <= 0}.
      * @throws java.lang.UnsupportedOperationException if the Java
@@ -521,32 +521,32 @@
      * measurement for the current thread.
      *
      * @return
-     *   <tt>true</tt>
+     *   {@code true}
      *     if the Java virtual machine supports CPU time
      *     measurement for any thread;
-     *   <tt>false</tt> otherwise.
+     *   {@code false} otherwise.
      */
     public boolean isThreadCpuTimeSupported();
 
     /**
      * Tests if the Java virtual machine supports CPU time
      * measurement for the current thread.
-     * This method returns <tt>true</tt> if {@link #isThreadCpuTimeSupported}
-     * returns <tt>true</tt>.
+     * This method returns {@code true} if {@link #isThreadCpuTimeSupported}
+     * returns {@code true}.
      *
      * @return
-     *   <tt>true</tt>
+     *   {@code true}
      *     if the Java virtual machine supports CPU time
      *     measurement for current thread;
-     *   <tt>false</tt> otherwise.
+     *   {@code false} otherwise.
      */
     public boolean isCurrentThreadCpuTimeSupported();
 
     /**
      * Tests if thread CPU time measurement is enabled.
      *
-     * @return <tt>true</tt> if thread CPU time measurement is enabled;
-     *         <tt>false</tt> otherwise.
+     * @return {@code true} if thread CPU time measurement is enabled;
+     *         {@code false} otherwise.
      *
      * @throws java.lang.UnsupportedOperationException if the Java virtual
      * machine does not support CPU time measurement for other threads
@@ -561,8 +561,8 @@
      * Enables or disables thread CPU time measurement.  The default
      * is platform dependent.
      *
-     * @param enable <tt>true</tt> to enable;
-     *               <tt>false</tt> to disable.
+     * @param enable {@code true} to enable;
+     *               {@code false} to disable.
      *
      * @throws java.lang.UnsupportedOperationException if the Java
      * virtual machine does not support CPU time measurement for
@@ -602,7 +602,7 @@
      * should be used.
      *
      * @return an array of IDs of the threads that are monitor
-     * deadlocked, if any; <tt>null</tt> otherwise.
+     * deadlocked, if any; {@code null} otherwise.
      *
      * @throws java.lang.SecurityException if a security manager
      *         exists and the caller does not have
@@ -640,7 +640,7 @@
      *
      * @return an array of IDs of the threads that are
      * deadlocked waiting for object monitors or ownable synchronizers, if any;
-     * <tt>null</tt> otherwise.
+     * {@code null} otherwise.
      *
      * @throws java.lang.SecurityException if a security manager
      *         exists and the caller does not have
@@ -659,10 +659,10 @@
      * object monitor usage.
      *
      * @return
-     *   <tt>true</tt>
+     *   {@code true}
      *     if the Java virtual machine supports monitoring of
      *     object monitor usage;
-     *   <tt>false</tt> otherwise.
+     *   {@code false} otherwise.
      *
      * @see #dumpAllThreads
      * @since 1.6
@@ -675,10 +675,10 @@
      * ownable synchronizer</a> usage.
      *
      * @return
-     *   <tt>true</tt>
+     *   {@code true}
      *     if the Java virtual machine supports monitoring of ownable
      *     synchronizer usage;
-     *   <tt>false</tt> otherwise.
+     *   {@code false} otherwise.
      *
      * @see #dumpAllThreads
      * @since 1.6
@@ -687,7 +687,7 @@
 
     /**
      * Returns the thread info for each thread
-     * whose ID is in the input array <tt>ids</tt>, with stack trace
+     * whose ID is in the input array {@code ids}, with stack trace
      * and synchronization information.
      *
      * <p>
@@ -696,30 +696,30 @@
      * <ul>
      *    <li>the entire stack trace,</li>
      *    <li>the object monitors currently locked by the thread
-     *        if <tt>lockedMonitors</tt> is <tt>true</tt>, and</li>
+     *        if {@code lockedMonitors} is {@code true}, and</li>
      *    <li>the <a href="LockInfo.html#OwnableSynchronizer">
      *        ownable synchronizers</a> currently locked by the thread
-     *        if <tt>lockedSynchronizers</tt> is <tt>true</tt>.</li>
+     *        if {@code lockedSynchronizers} is {@code true}.</li>
      * </ul>
      * <p>
-     * This method returns an array of the <tt>ThreadInfo</tt> objects,
+     * This method returns an array of the {@code ThreadInfo} objects,
      * each is the thread information about the thread with the same index
-     * as in the <tt>ids</tt> array.
+     * as in the {@code ids} array.
      * If a thread of the given ID is not alive or does not exist,
-     * <tt>null</tt> will be set in the corresponding element
+     * {@code null} will be set in the corresponding element
      * in the returned array.  A thread is alive if
      * it has been started and has not yet died.
      * <p>
-     * If a thread does not lock any object monitor or <tt>lockedMonitors</tt>
-     * is <tt>false</tt>, the returned <tt>ThreadInfo</tt> object will have an
-     * empty <tt>MonitorInfo</tt> array.  Similarly, if a thread does not
-     * lock any synchronizer or <tt>lockedSynchronizers</tt> is <tt>false</tt>,
-     * the returned <tt>ThreadInfo</tt> object
-     * will have an empty <tt>LockInfo</tt> array.
+     * If a thread does not lock any object monitor or {@code lockedMonitors}
+     * is {@code false}, the returned {@code ThreadInfo} object will have an
+     * empty {@code MonitorInfo} array.  Similarly, if a thread does not
+     * lock any synchronizer or {@code lockedSynchronizers} is {@code false},
+     * the returned {@code ThreadInfo} object
+     * will have an empty {@code LockInfo} array.
      *
      * <p>
-     * When both <tt>lockedMonitors</tt> and <tt>lockedSynchronizers</tt>
-     * parameters are <tt>false</tt>, it is equivalent to calling:
+     * When both {@code lockedMonitors} and {@code lockedSynchronizers}
+     * parameters are {@code false}, it is equivalent to calling:
      * <blockquote><pre>
      *     {@link #getThreadInfo(long[], int)  getThreadInfo(ids, Integer.MAX_VALUE)}
      * </pre></blockquote>
@@ -730,13 +730,13 @@
      *
      * <p>
      * <b>MBeanServer access</b>:<br>
-     * The mapped type of <tt>ThreadInfo</tt> is
-     * <tt>CompositeData</tt> with attributes as specified in the
+     * The mapped type of {@code ThreadInfo} is
+     * {@code CompositeData} with attributes as specified in the
      * {@link ThreadInfo#from ThreadInfo.from} method.
      *
      * @param  ids an array of thread IDs.
-     * @param  lockedMonitors if <tt>true</tt>, retrieves all locked monitors.
-     * @param  lockedSynchronizers if <tt>true</tt>, retrieves all locked
+     * @param  lockedMonitors if {@code true}, retrieves all locked monitors.
+     * @param  lockedSynchronizers if {@code true}, retrieves all locked
      *             ownable synchronizers.
      *
      * @return an array of the {@link ThreadInfo} objects, each containing
@@ -748,11 +748,11 @@
      *         ManagementPermission("monitor").
      * @throws java.lang.UnsupportedOperationException
      *         <ul>
-     *           <li>if <tt>lockedMonitors</tt> is <tt>true</tt> but
+     *           <li>if {@code lockedMonitors} is {@code true} but
      *               the Java virtual machine does not support monitoring
      *               of {@linkplain #isObjectMonitorUsageSupported
      *               object monitor usage}; or</li>
-     *           <li>if <tt>lockedSynchronizers</tt> is <tt>true</tt> but
+     *           <li>if {@code lockedSynchronizers} is {@code true} but
      *               the Java virtual machine does not support monitoring
      *               of {@linkplain #isSynchronizerUsageSupported
      *               ownable synchronizer usage}.</li>
@@ -776,8 +776,8 @@
      * as specified in the {@link #getThreadInfo(long[], boolean, boolean)}
      * method.
      *
-     * @param  lockedMonitors if <tt>true</tt>, dump all locked monitors.
-     * @param  lockedSynchronizers if <tt>true</tt>, dump all locked
+     * @param  lockedMonitors if {@code true}, dump all locked monitors.
+     * @param  lockedSynchronizers if {@code true}, dump all locked
      *             ownable synchronizers.
      *
      * @return an array of {@link ThreadInfo} for all live threads.
@@ -787,11 +787,11 @@
      *         ManagementPermission("monitor").
      * @throws java.lang.UnsupportedOperationException
      *         <ul>
-     *           <li>if <tt>lockedMonitors</tt> is <tt>true</tt> but
+     *           <li>if {@code lockedMonitors} is {@code true} but
      *               the Java virtual machine does not support monitoring
      *               of {@linkplain #isObjectMonitorUsageSupported
      *               object monitor usage}; or</li>
-     *           <li>if <tt>lockedSynchronizers</tt> is <tt>true</tt> but
+     *           <li>if {@code lockedSynchronizers} is {@code true} but
      *               the Java virtual machine does not support monitoring
      *               of {@linkplain #isSynchronizerUsageSupported
      *               ownable synchronizer usage}.</li>
--- a/jdk/src/java.management/share/classes/java/lang/management/package.html	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/java/lang/management/package.html	Mon Aug 10 14:05:37 2015 +0300
@@ -169,7 +169,7 @@
 the management interface by defining platform-dependent
 interfaces that extend the standard management interfaces to include
 platform-specific metrics and management operations.
-The static factory methods in the <tt>ManagementFactory</tt> class will
+The static factory methods in the <code>ManagementFactory</code> class will
 return the MXBeans with the platform extension.
 
 <p>
@@ -205,7 +205,7 @@
 </blockquote>
 
 <p>
-2) Access the Oracle-specific MXBean interface via <tt>MBeanServer</tt>
+2) Access the Oracle-specific MXBean interface via <code>MBeanServer</code>
    through proxy
 
 <blockquote><pre>
@@ -228,7 +228,7 @@
    }
 </pre></blockquote>
 
-<p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor
+<p> Unless otherwise noted, passing a <code>null</code> argument to a constructor
 or method in any class or interface in this package will cause a {@link
 java.lang.NullPointerException NullPointerException} to be thrown.
 
--- a/jdk/src/java.management/share/classes/javax/management/MBeanAttributeInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanAttributeInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -92,7 +92,7 @@
 
 
     /**
-     * Constructs an <CODE>MBeanAttributeInfo</CODE> object.
+     * Constructs an {@code MBeanAttributeInfo} object.
      *
      * @param name The name of the attribute.
      * @param type The type or class name of the attribute.
@@ -118,7 +118,7 @@
     }
 
     /**
-     * Constructs an <CODE>MBeanAttributeInfo</CODE> object.
+     * Constructs an {@code MBeanAttributeInfo} object.
      *
      * @param name The name of the attribute.
      * @param type The type or class name of the attribute.
@@ -193,9 +193,9 @@
 
     /**
      * <p>Returns a shallow clone of this instance.
-     * The clone is obtained by simply calling <tt>super.clone()</tt>,
+     * The clone is obtained by simply calling {@code super.clone()},
      * thus calling the default native shallow cloning mechanism
-     * implemented by <tt>Object.clone()</tt>.
+     * implemented by {@code Object.clone()}.
      * No deeper cloning of any internal field is made.</p>
      *
      * <p>Since this class is immutable, cloning is chiefly of
@@ -274,7 +274,7 @@
      *
      * @param o the object to compare to.
      *
-     * @return true if and only if <code>o</code> is an MBeanAttributeInfo such
+     * @return true if and only if {@code o} is an MBeanAttributeInfo such
      * that its {@link #getName()}, {@link #getType()}, {@link
      * #getDescription()}, {@link #isReadable()}, {@link
      * #isWritable()}, and {@link #isIs()} values are equal (not
--- a/jdk/src/java.management/share/classes/javax/management/MBeanConstructorInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanConstructorInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -55,14 +55,14 @@
     private final MBeanParameterInfo[] signature;
 
     /**
-     * Constructs an <CODE>MBeanConstructorInfo</CODE> object.  The
+     * Constructs an {@code MBeanConstructorInfo} object.  The
      * {@link Descriptor} of the constructed object will include
      * fields contributed by any annotations on the {@code
      * Constructor} object that contain the {@link DescriptorKey}
      * meta-annotation.
      *
      * @param description A human readable description of the operation.
-     * @param constructor The <CODE>java.lang.reflect.Constructor</CODE>
+     * @param constructor The {@code java.lang.reflect.Constructor}
      * object describing the MBean constructor.
      */
     public MBeanConstructorInfo(String description, Constructor<?> constructor) {
@@ -72,10 +72,10 @@
     }
 
     /**
-     * Constructs an <CODE>MBeanConstructorInfo</CODE> object.
+     * Constructs an {@code MBeanConstructorInfo} object.
      *
      * @param name The name of the constructor.
-     * @param signature <CODE>MBeanParameterInfo</CODE> objects
+     * @param signature {@code MBeanParameterInfo} objects
      * describing the parameters(arguments) of the constructor.  This
      * may be null with the same effect as a zero-length array.
      * @param description A human readable description of the constructor.
@@ -87,10 +87,10 @@
     }
 
     /**
-     * Constructs an <CODE>MBeanConstructorInfo</CODE> object.
+     * Constructs an {@code MBeanConstructorInfo} object.
      *
      * @param name The name of the constructor.
-     * @param signature <CODE>MBeanParameterInfo</CODE> objects
+     * @param signature {@code MBeanParameterInfo} objects
      * describing the parameters(arguments) of the constructor.  This
      * may be null with the same effect as a zero-length array.
      * @param description A human readable description of the constructor.
@@ -118,9 +118,9 @@
 
     /**
      * <p>Returns a shallow clone of this instance.  The clone is
-     * obtained by simply calling <tt>super.clone()</tt>, thus calling
+     * obtained by simply calling {@code super.clone()}, thus calling
      * the default native shallow cloning mechanism implemented by
-     * <tt>Object.clone()</tt>.  No deeper cloning of any internal
+     * {@code Object.clone()}.  No deeper cloning of any internal
      * field is made.</p>
      *
      * <p>Since this class is immutable, cloning is chiefly of
@@ -137,16 +137,16 @@
 
     /**
      * <p>Returns the list of parameters for this constructor.  Each
-     * parameter is described by an <CODE>MBeanParameterInfo</CODE>
+     * parameter is described by an {@code MBeanParameterInfo}
      * object.</p>
      *
      * <p>The returned array is a shallow copy of the internal array,
      * which means that it is a copy of the internal array of
-     * references to the <CODE>MBeanParameterInfo</CODE> objects but
-     * that each referenced <CODE>MBeanParameterInfo</CODE> object is
+     * references to the {@code MBeanParameterInfo} objects but
+     * that each referenced {@code MBeanParameterInfo} object is
      * not copied.</p>
      *
-     * @return  An array of <CODE>MBeanParameterInfo</CODE> objects.
+     * @return  An array of {@code MBeanParameterInfo} objects.
      */
     public MBeanParameterInfo[] getSignature() {
         if (signature.length == 0)
@@ -177,7 +177,7 @@
      *
      * @param o the object to compare to.
      *
-     * @return true if and only if <code>o</code> is an MBeanConstructorInfo such
+     * @return true if and only if {@code o} is an MBeanConstructorInfo such
      * that its {@link #getName()}, {@link #getDescription()},
      * {@link #getSignature()}, and {@link #getDescriptor()}
      * values are equal (not necessarily
--- a/jdk/src/java.management/share/classes/javax/management/MBeanInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -57,12 +57,12 @@
  * <a href="Descriptor.html#infoTimeout">infoTimeout</a> fields in the {@code
  * MBeanInfo} {@link Descriptor}.</p>
  *
- * <p>The contents of the <code>MBeanInfo</code> for a Dynamic MBean
+ * <p>The contents of the {@code MBeanInfo} for a Dynamic MBean
  * are determined by its {@link DynamicMBean#getMBeanInfo
  * getMBeanInfo()} method.  This includes Open MBeans and Model
  * MBeans, which are kinds of Dynamic MBeans.</p>
  *
- * <p>The contents of the <code>MBeanInfo</code> for a Standard MBean
+ * <p>The contents of the {@code MBeanInfo} for a Standard MBean
  * are determined by the MBean server as follows:</p>
  *
  * <ul>
@@ -96,7 +96,7 @@
  * <p>The description returned by {@link #getDescription()} and the
  * descriptions of the contained attributes and operations are not specified.</p>
  *
- * <p>The remaining details of the <code>MBeanInfo</code> for a
+ * <p>The remaining details of the {@code MBeanInfo} for a
  * Standard MBean are not specified.  This includes the description of
  * any contained constructors, and notifications; the names
  * of parameters to constructors and operations; and the descriptions of
@@ -161,10 +161,10 @@
     private final transient boolean arrayGettersSafe;
 
     /**
-     * Constructs an <CODE>MBeanInfo</CODE>.
+     * Constructs an {@code MBeanInfo}.
      *
      * @param className The name of the Java class of the MBean described
-     * by this <CODE>MBeanInfo</CODE>.  This value may be any
+     * by this {@code MBeanInfo}.  This value may be any
      * syntactically legal Java class name.  It does not have to be a
      * Java class known to the MBean server or to the MBean's
      * ClassLoader.  If it is a Java class known to the MBean's
@@ -195,10 +195,10 @@
     }
 
     /**
-     * Constructs an <CODE>MBeanInfo</CODE>.
+     * Constructs an {@code MBeanInfo}.
      *
      * @param className The name of the Java class of the MBean described
-     * by this <CODE>MBeanInfo</CODE>.  This value may be any
+     * by this {@code MBeanInfo}.  This value may be any
      * syntactically legal Java class name.  It does not have to be a
      * Java class known to the MBean server or to the MBean's
      * ClassLoader.  If it is a Java class known to the MBean's
@@ -260,9 +260,9 @@
 
     /**
      * <p>Returns a shallow clone of this instance.
-     * The clone is obtained by simply calling <tt>super.clone()</tt>,
+     * The clone is obtained by simply calling {@code super.clone()},
      * thus calling the default native shallow cloning mechanism
-     * implemented by <tt>Object.clone()</tt>.
+     * implemented by {@code Object.clone()}.
      * No deeper cloning of any internal field is made.</p>
      *
      * <p>Since this class is immutable, the clone method is chiefly of
@@ -281,7 +281,7 @@
 
     /**
      * Returns the name of the Java class of the MBean described by
-     * this <CODE>MBeanInfo</CODE>.
+     * this {@code MBeanInfo}.
      *
      * @return the class name.
      */
@@ -300,14 +300,14 @@
 
     /**
      * Returns the list of attributes exposed for management.
-     * Each attribute is described by an <CODE>MBeanAttributeInfo</CODE> object.
+     * Each attribute is described by an {@code MBeanAttributeInfo} object.
      *
      * The returned array is a shallow copy of the internal array,
      * which means that it is a copy of the internal array of
-     * references to the <CODE>MBeanAttributeInfo</CODE> objects
-     * but that each referenced <CODE>MBeanAttributeInfo</CODE> object is not copied.
+     * references to the {@code MBeanAttributeInfo} objects
+     * but that each referenced {@code MBeanAttributeInfo} object is not copied.
      *
-     * @return  An array of <CODE>MBeanAttributeInfo</CODE> objects.
+     * @return  An array of {@code MBeanAttributeInfo} objects.
      */
     public MBeanAttributeInfo[] getAttributes()   {
         MBeanAttributeInfo[] as = nonNullAttributes();
@@ -342,14 +342,14 @@
 
     /**
      * Returns the list of operations  of the MBean.
-     * Each operation is described by an <CODE>MBeanOperationInfo</CODE> object.
+     * Each operation is described by an {@code MBeanOperationInfo} object.
      *
      * The returned array is a shallow copy of the internal array,
      * which means that it is a copy of the internal array of
-     * references to the <CODE>MBeanOperationInfo</CODE> objects
-     * but that each referenced <CODE>MBeanOperationInfo</CODE> object is not copied.
+     * references to the {@code MBeanOperationInfo} objects
+     * but that each referenced {@code MBeanOperationInfo} object is not copied.
      *
-     * @return  An array of <CODE>MBeanOperationInfo</CODE> objects.
+     * @return  An array of {@code MBeanOperationInfo} objects.
      */
     public MBeanOperationInfo[] getOperations()  {
         MBeanOperationInfo[] os = nonNullOperations();
@@ -374,12 +374,12 @@
     /**
      * <p>Returns the list of the public constructors of the MBean.
      * Each constructor is described by an
-     * <CODE>MBeanConstructorInfo</CODE> object.</p>
+     * {@code MBeanConstructorInfo} object.</p>
      *
      * <p>The returned array is a shallow copy of the internal array,
      * which means that it is a copy of the internal array of
-     * references to the <CODE>MBeanConstructorInfo</CODE> objects but
-     * that each referenced <CODE>MBeanConstructorInfo</CODE> object
+     * references to the {@code MBeanConstructorInfo} objects but
+     * that each referenced {@code MBeanConstructorInfo} object
      * is not copied.</p>
      *
      * <p>The returned list is not necessarily exhaustive.  That is,
@@ -388,7 +388,7 @@
      * instance of this MBean's class using that constructor, even
      * though it is not listed here.</p>
      *
-     * @return  An array of <CODE>MBeanConstructorInfo</CODE> objects.
+     * @return  An array of {@code MBeanConstructorInfo} objects.
      */
     public MBeanConstructorInfo[] getConstructors()  {
         MBeanConstructorInfo[] cs = nonNullConstructors();
@@ -412,14 +412,14 @@
 
     /**
      * Returns the list of the notifications emitted by the MBean.
-     * Each notification is described by an <CODE>MBeanNotificationInfo</CODE> object.
+     * Each notification is described by an {@code MBeanNotificationInfo} object.
      *
      * The returned array is a shallow copy of the internal array,
      * which means that it is a copy of the internal array of
-     * references to the <CODE>MBeanNotificationInfo</CODE> objects
-     * but that each referenced <CODE>MBeanNotificationInfo</CODE> object is not copied.
+     * references to the {@code MBeanNotificationInfo} objects
+     * but that each referenced {@code MBeanNotificationInfo} object is not copied.
      *
-     * @return  An array of <CODE>MBeanNotificationInfo</CODE> objects.
+     * @return  An array of {@code MBeanNotificationInfo} objects.
      */
     public MBeanNotificationInfo[] getNotifications()  {
         MBeanNotificationInfo[] ns = nonNullNotifications();
@@ -482,7 +482,7 @@
      *
      * @param o the object to compare to.
      *
-     * @return true if and only if <code>o</code> is an MBeanInfo that is equal
+     * @return true if and only if {@code o} is an MBeanInfo that is equal
      * to this one according to the rules above.
      */
     @Override
@@ -534,12 +534,12 @@
         new WeakHashMap<Class<?>, Boolean>();
 
     /**
-     * Return true if <code>subclass</code> is known to preserve the
-     * immutability of <code>immutableClass</code>.  The class
-     * <code>immutableClass</code> is a reference class that is known
-     * to be immutable.  The subclass <code>subclass</code> is
+     * Return true if {@code subclass} is known to preserve the
+     * immutability of {@code immutableClass}.  The class
+     * {@code immutableClass} is a reference class that is known
+     * to be immutable.  The subclass {@code subclass} is
      * considered immutable if it does not override any public method
-     * of <code>immutableClass</code> whose name begins with "get".
+     * of {@code immutableClass} whose name begins with "get".
      * This is obviously not an infallible test for immutability,
      * but it works for the public interfaces of the MBean*Info classes.
     */
--- a/jdk/src/java.management/share/classes/javax/management/MBeanNotificationInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanNotificationInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -32,29 +32,29 @@
 import java.util.Objects;
 
 /**
- * <p>The <CODE>MBeanNotificationInfo</CODE> class is used to describe the
+ * <p>The {@code MBeanNotificationInfo} class is used to describe the
  * characteristics of the different notification instances
  * emitted by an MBean, for a given Java class of notification.
  * If an MBean emits notifications that can be instances of different Java classes,
- * then the metadata for that MBean should provide an <CODE>MBeanNotificationInfo</CODE>
+ * then the metadata for that MBean should provide an {@code MBeanNotificationInfo}
  * object for each of these notification Java classes.</p>
  *
  * <p>Instances of this class are immutable.  Subclasses may be
  * mutable but this is not recommended.</p>
  *
- * <p>This class extends <CODE>javax.management.MBeanFeatureInfo</CODE>
- * and thus provides <CODE>name</CODE> and <CODE>description</CODE> fields.
- * The <CODE>name</CODE> field should be the fully qualified Java class name of
+ * <p>This class extends {@code javax.management.MBeanFeatureInfo}
+ * and thus provides {@code name} and {@code description} fields.
+ * The {@code name} field should be the fully qualified Java class name of
  * the notification objects described by this class.</p>
  *
- * <p>The <CODE>getNotifTypes</CODE> method returns an array of
+ * <p>The {@code getNotifTypes} method returns an array of
  * strings containing the notification types that the MBean may
  * emit. The notification type is a dot-notation string which
  * describes what the emitted notification is about, not the Java
  * class of the notification.  A single generic notification class can
  * be used to send notifications of several types.  All of these types
  * are returned in the string array result of the
- * <CODE>getNotifTypes</CODE> method.
+ * {@code getNotifTypes} method.
  *
  * @since 1.5
  */
@@ -77,7 +77,7 @@
     private final transient boolean arrayGettersSafe;
 
     /**
-     * Constructs an <CODE>MBeanNotificationInfo</CODE> object.
+     * Constructs an {@code MBeanNotificationInfo} object.
      *
      * @param notifTypes The array of strings (in dot notation)
      * containing the notification types that the MBean may emit.
@@ -93,7 +93,7 @@
     }
 
     /**
-     * Constructs an <CODE>MBeanNotificationInfo</CODE> object.
+     * Constructs an {@code MBeanNotificationInfo} object.
      *
      * @param notifTypes The array of strings (in dot notation)
      * containing the notification types that the MBean may emit.
@@ -128,9 +128,9 @@
 
     /**
      * Returns a shallow clone of this instance.
-     * The clone is obtained by simply calling <tt>super.clone()</tt>,
+     * The clone is obtained by simply calling {@code super.clone()},
      * thus calling the default native shallow cloning mechanism
-     * implemented by <tt>Object.clone()</tt>.
+     * implemented by {@code Object.clone()}.
      * No deeper cloning of any internal field is made.
      */
      public Object clone () {
@@ -179,7 +179,7 @@
      *
      * @param o the object to compare to.
      *
-     * @return true if and only if <code>o</code> is an MBeanNotificationInfo
+     * @return true if and only if {@code o} is an MBeanNotificationInfo
      * such that its {@link #getName()}, {@link #getDescription()},
      * {@link #getDescriptor()},
      * and {@link #getNotifTypes()} values are equal (not necessarily
--- a/jdk/src/java.management/share/classes/javax/management/MBeanOperationInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanOperationInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -83,10 +83,7 @@
 
     /**
      * @serial The impact of the method, one of
-     *         <CODE>INFO</CODE>,
-     *         <CODE>ACTION</CODE>,
-     *         <CODE>ACTION_INFO</CODE>,
-     *         <CODE>UNKNOWN</CODE>
+     *         {@code INFO, ACTION, ACTION_INFO, UNKNOWN}.
      */
     private final int impact;
 
@@ -95,12 +92,12 @@
 
 
     /**
-     * Constructs an <CODE>MBeanOperationInfo</CODE> object.  The
+     * Constructs an {@code MBeanOperationInfo} object.  The
      * {@link Descriptor} of the constructed object will include
      * fields contributed by any annotations on the {@code Method}
      * object that contain the {@link DescriptorKey} meta-annotation.
      *
-     * @param method The <CODE>java.lang.reflect.Method</CODE> object
+     * @param method The {@code java.lang.reflect.Method} object
      * describing the MBean operation.
      * @param description A human readable description of the operation.
      */
@@ -114,11 +111,11 @@
     }
 
     /**
-     * Constructs an <CODE>MBeanOperationInfo</CODE> object.
+     * Constructs an {@code MBeanOperationInfo} object.
      *
      * @param name The name of the method.
      * @param description A human readable description of the operation.
-     * @param signature <CODE>MBeanParameterInfo</CODE> objects
+     * @param signature {@code MBeanParameterInfo} objects
      * describing the parameters(arguments) of the method.  This may be
      * null with the same effect as a zero-length array.
      * @param type The type of the method's return value.
@@ -135,11 +132,11 @@
     }
 
     /**
-     * Constructs an <CODE>MBeanOperationInfo</CODE> object.
+     * Constructs an {@code MBeanOperationInfo} object.
      *
      * @param name The name of the method.
      * @param description A human readable description of the operation.
-     * @param signature <CODE>MBeanParameterInfo</CODE> objects
+     * @param signature {@code MBeanParameterInfo} objects
      * describing the parameters(arguments) of the method.  This may be
      * null with the same effect as a zero-length array.
      * @param type The type of the method's return value.
@@ -174,9 +171,9 @@
 
     /**
      * <p>Returns a shallow clone of this instance.
-     * The clone is obtained by simply calling <tt>super.clone()</tt>,
+     * The clone is obtained by simply calling {@code super.clone()},
      * thus calling the default native shallow cloning mechanism
-     * implemented by <tt>Object.clone()</tt>.
+     * implemented by {@code Object.clone()}.
      * No deeper cloning of any internal field is made.</p>
      *
      * <p>Since this class is immutable, cloning is chiefly of interest
@@ -203,16 +200,16 @@
 
     /**
      * <p>Returns the list of parameters for this operation.  Each
-     * parameter is described by an <CODE>MBeanParameterInfo</CODE>
+     * parameter is described by an {@code MBeanParameterInfo}
      * object.</p>
      *
      * <p>The returned array is a shallow copy of the internal array,
      * which means that it is a copy of the internal array of
-     * references to the <CODE>MBeanParameterInfo</CODE> objects but
-     * that each referenced <CODE>MBeanParameterInfo</CODE> object is
+     * references to the {@code MBeanParameterInfo} objects but
+     * that each referenced {@code MBeanParameterInfo} object is
      * not copied.</p>
      *
-     * @return  An array of <CODE>MBeanParameterInfo</CODE> objects.
+     * @return  An array of {@code MBeanParameterInfo} objects.
      */
     public MBeanParameterInfo[] getSignature() {
         // If MBeanOperationInfo was created in our implementation,
@@ -247,7 +244,7 @@
 
     /**
      * Returns the impact of the method, one of
-     * <CODE>INFO</CODE>, <CODE>ACTION</CODE>, <CODE>ACTION_INFO</CODE>, <CODE>UNKNOWN</CODE>.
+     * {@code INFO, ACTION, ACTION_INFO, UNKNOWN}.
      *
      * @return the impact code.
      */
@@ -280,7 +277,7 @@
      *
      * @param o the object to compare to.
      *
-     * @return true if and only if <code>o</code> is an MBeanOperationInfo such
+     * @return true if and only if {@code o} is an MBeanOperationInfo such
      * that its {@link #getName()}, {@link #getReturnType()}, {@link
      * #getDescription()}, {@link #getImpact()}, {@link #getDescriptor()}
      * and {@link #getSignature()} values are equal (not necessarily identical)
--- a/jdk/src/java.management/share/classes/javax/management/MBeanParameterInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanParameterInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -50,7 +50,7 @@
 
 
     /**
-     * Constructs an <CODE>MBeanParameterInfo</CODE> object.
+     * Constructs an {@code MBeanParameterInfo} object.
      *
      * @param name The name of the data
      * @param type The type or class name of the data
@@ -63,7 +63,7 @@
     }
 
     /**
-     * Constructs an <CODE>MBeanParameterInfo</CODE> object.
+     * Constructs an {@code MBeanParameterInfo} object.
      *
      * @param name The name of the data
      * @param type The type or class name of the data
@@ -85,9 +85,9 @@
 
     /**
      * <p>Returns a shallow clone of this instance.
-     * The clone is obtained by simply calling <tt>super.clone()</tt>,
+     * The clone is obtained by simply calling {@code super.clone()},
      * thus calling the default native shallow cloning mechanism
-     * implemented by <tt>Object.clone()</tt>.
+     * implemented by {@code Object.clone()}.
      * No deeper cloning of any internal field is made.</p>
      *
      * <p>Since this class is immutable, cloning is chiefly of
@@ -126,7 +126,7 @@
      *
      * @param o the object to compare to.
      *
-     * @return true if and only if <code>o</code> is an MBeanParameterInfo such
+     * @return true if and only if {@code o} is an MBeanParameterInfo such
      * that its {@link #getName()}, {@link #getType()},
      * {@link #getDescriptor()}, and {@link
      * #getDescription()} values are equal (not necessarily identical)
--- a/jdk/src/java.management/share/classes/javax/management/monitor/package.html	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/monitor/package.html	Mon Aug 10 14:05:37 2015 +0300
@@ -41,20 +41,20 @@
       <p id="complex">The value being monitored can be a simple value
       contained within a complex type. For example, the {@link
       java.lang.management.MemoryMXBean MemoryMXBean} defined in
-      <tt>java.lang.management</tt> has an attribute
-      <tt>HeapMemoryUsage</tt> of type {@link
+      {@code java.lang.management} has an attribute
+      {@code HeapMemoryUsage} of type {@link
       java.lang.management.MemoryUsage MemoryUsage}. To monitor the
-      amount of <i>used</i> memory, described by the <tt>used</tt>
-      property of <tt>MemoryUsage</tt>, you could monitor
-      "<tt>HeapMemoryUsage.used</tt>". That string would be the
+      amount of <i>used</i> memory, described by the {@code used}
+      property of {@code MemoryUsage}, you could monitor
+      "{@code HeapMemoryUsage.used}". That string would be the
       argument to {@link
       javax.management.monitor.MonitorMBean#setObservedAttribute(String)
       setObservedAttribute}.</p>
 
-      <p>The rules used to interpret an <tt>ObservedAttribute</tt> like
-      <tt>"HeapMemoryUsage.used"</tt> are as follows. Suppose the string is
-      <i>A.e</i> (so <i>A</i> would be <tt>"HeapMemoryUsage"</tt> and <i>e</i>
-      would be <tt>"used"</tt> in the example).</p>
+      <p>The rules used to interpret an {@code ObservedAttribute} like
+      {@code "HeapMemoryUsage.used"} are as follows. Suppose the string is
+      <i>A.e</i> (so <i>A</i> would be {@code "HeapMemoryUsage"} and <i>e</i>
+      would be {@code "used"} in the example).</p>
 
       <p>First the value of the attribute <i>A</i> is obtained. Call it
       <i>v</i>. A value <i>x</i> is extracted from <i>v</i> as follows:</p>
@@ -65,49 +65,49 @@
       CompositeData} and if <i>v</i>.{@link
       javax.management.openmbean.CompositeData#get(String) get}(<i>e</i>)
       returns a value then <i>x</i> is that value.</li>
-      <li>If <i>v</i> is an array and <i>e</i> is the string <tt>"length"</tt>
+      <li>If <i>v</i> is an array and <i>e</i> is the string {@code "length"}
       then <i>x</i> is the length of the array.</li>
       
       <li>If the above rules do not produce a value, and if introspection, as
       if by calling {@link java.beans.Introspector#getBeanInfo(Class) 
       Introspector.getBeanInfo}, for the class of <i>v</i> 
-      (<i>v</i>.<tt>getClass()</tt>) identifies a property with the name 
+      (<i>v</i>.{@code getClass()}) identifies a property with the name 
       <i>e</i>, then <i>x</i> is the result of reading the property value. </li>
       
       </ul>
 
       <p>The third rule means for example that if the attribute
-      <tt>HeapMemoryUsage</tt> is a <tt>MemoryUsage</tt>, monitoring
-      <tt>"HeapMemoryUsage.used"</tt> will obtain the observed value by
-      calling <tt>MemoryUsage.getUsed()</tt>.</p>
+      {@code HeapMemoryUsage} is a {@code MemoryUsage}, monitoring
+      {@code "HeapMemoryUsage.used"} will obtain the observed value by
+      calling {@code MemoryUsage.getUsed()}.</p>
 
-      <p>If the <tt>ObservedAttribute</tt> contains more than one period,
-      for example <tt>"ConnectionPool.connectionStats.length"</tt>, then the
+      <p>If the {@code ObservedAttribute} contains more than one period,
+      for example {@code "ConnectionPool.connectionStats.length"}, then the
       above rules are applied iteratively. Here, <i>v</i> would initially be
-      the value of the attribute <tt>ConnectionPool</tt>, and <i>x</i> would
+      the value of the attribute {@code ConnectionPool}, and <i>x</i> would
       be derived by applying the above rules with <i>e</i> equal to
-      <tt>"connectionStats"</tt>. Then <i>v</i> would be set to this <i>x</i>
+      {@code "connectionStats"}. Then <i>v</i> would be set to this <i>x</i>
       and a new <i>x</i> derived by applying the rules again with <i>e</i>
-      equal to <tt>"length"</tt>.</p>
+      equal to {@code "length"}.</p>
 
       <p>Although it is recommended that attribute names be valid Java
       identifiers, it is possible for an attribute to be called
-      <tt>HeapMemoryUsage.used</tt>. This means that an
-      <tt>ObservedAttribute</tt> that is <tt>HeapMemoryUsage.used</tt>
+      {@code HeapMemoryUsage.used}. This means that an
+      {@code ObservedAttribute} that is {@code HeapMemoryUsage.used}
       could mean that the value to observe is either an attribute of that
-      name, or the property <tt>used</tt> within an attribute called
-      <tt>HeapMemoryUsage</tt>. So for compatibility reasons, when the
-      <tt>ObservedAttribute</tt> contains a period (<tt>.</tt>), the monitor
+      name, or the property {@code used} within an attribute called
+      {@code HeapMemoryUsage}. So for compatibility reasons, when the
+      {@code ObservedAttribute} contains a period ({@code .}), the monitor
       will check whether an attribute exists whose name is the full
-      <tt>ObservedAttribute</tt> string (<tt>HeapMemoryUsage.used</tt> in the
+      {@code ObservedAttribute} string ({@code HeapMemoryUsage.used} in the
       example). It does this by calling {@link
       javax.management.MBeanServer#getMBeanInfo(javax.management.ObjectName)
       getMBeanInfo} for the observed MBean and looking for a contained {@link
       javax.management.MBeanAttributeInfo MBeanAttributeInfo} with the given
       name. If one is found, then that is what is monitored. If more than one
       MBean is being observed, the behavior is unspecified if some of them have
-      a <tt>HeapMemoryUsage.used</tt> attribute and others do not. An
-      implementation may therefore call <tt>getMBeanInfo</tt> on just one of
+      a {@code HeapMemoryUsage.used} attribute and others do not. An
+      implementation may therefore call {@code getMBeanInfo} on just one of
       the MBeans in this case. The behavior is also unspecified if the result
       of the check changes while the monitor is active.</p>
 
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/ArrayType.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/ArrayType.java	Mon Aug 10 14:05:37 2015 +0300
@@ -29,7 +29,7 @@
 import java.lang.reflect.Array;
 
 /**
- * The <code>ArrayType</code> class is the <i>open type</i> class whose instances describe
+ * The {@code ArrayType} class is the <i>open type</i> class whose instances describe
  * all <i>open data</i> values which are n-dimensional arrays of <i>open data</i> values.
  * <p>
  * Examples of valid {@code ArrayType} instances are:
@@ -222,22 +222,31 @@
     /* *** Constructor *** */
 
     /**
-     * Constructs an <tt>ArrayType</tt> instance describing <i>open data</i> values which are
-     * arrays with dimension <var>dimension</var> of elements whose <i>open type</i> is <var>elementType</var>.
+     * Constructs an {@code ArrayType} instance describing <i>open data</i> values which are
+     * arrays with dimension <var>dimension</var> of elements
+     * whose <i>open type</i> is <var>elementType</var>.
      * <p>
-     * When invoked on an <tt>ArrayType</tt> instance, the {@link OpenType#getClassName() getClassName} method
-     * returns the class name of the array instances it describes (following the rules defined by the
-     * {@link Class#getName() getName} method of <code>java.lang.Class</code>), not the class name of the array elements
-     * (which is returned by a call to <tt>getElementOpenType().getClassName()</tt>).
+     * When invoked on an {@code ArrayType} instance,
+     * the {@link OpenType#getClassName() getClassName} method
+     * returns the class name of the array instances it describes
+     * (following the rules defined by the
+     * {@link Class#getName() getName} method of {@code java.lang.Class}),
+     * not the class name of the array elements
+     * (which is returned by a call to {@code getElementOpenType().getClassName()}).
      * <p>
-     * The internal field corresponding to the type name of this <code>ArrayType</code> instance is also set to
+     * The internal field corresponding to the type name of this
+     * {@code ArrayType} instance is also set to
      * the class name of the array instances it describes.
-     * In other words, the methods <code>getClassName</code> and <code>getTypeName</code> return the same string value.
-     * The internal field corresponding to the description of this <code>ArrayType</code> instance is set to a string value
+     * In other words, the methods {@code getClassName} and
+     * {@code getTypeName} return the same string value.
+     * The internal field corresponding to the description of this
+     * {@code ArrayType} instance is set to a string value
      * which follows the following template:
      * <ul>
-     * <li>if non-primitive array: <tt><i>&lt;dimension&gt;</i>-dimension array of <i>&lt;element_class_name&gt;</i></tt></li>
-     * <li>if primitive array: <tt><i>&lt;dimension&gt;</i>-dimension array of <i>&lt;primitive_type_of_the_element_class_name&gt;</i></tt></li>
+     * <li>if non-primitive array: <code><i>&lt;dimension&gt;</i>-dimension array
+     *     of <i>&lt;element_class_name&gt;</i></code></li>
+     * <li>if primitive array: <code><i>&lt;dimension&gt;</i>-dimension array
+     *     of <i>&lt;primitive_type_of_the_element_class_name&gt;</i></code></li>
      * </ul>
      * <p>
      * As an example, the following piece of code:
@@ -267,16 +276,16 @@
      * System.out.println("array type description = " + t3.getDescription());
      * }</pre>
      *
-     * @param  dimension  the dimension of arrays described by this <tt>ArrayType</tt> instance;
+     * @param  dimension  the dimension of arrays described by this {@code ArrayType} instance;
      *                    must be greater than or equal to 1.
      *
      * @param  elementType  the <i>open type</i> of element values contained
-     *                      in the arrays described by this <tt>ArrayType</tt>
+     *                      in the arrays described by this {@code ArrayType}
      *                      instance; must be an instance of either
-     *                      <tt>SimpleType</tt>, <tt>CompositeType</tt>,
-     *                      <tt>TabularType</tt> or another <tt>ArrayType</tt>
-     *                      with a <tt>SimpleType</tt>, <tt>CompositeType</tt>
-     *                      or <tt>TabularType</tt> as its <tt>elementType</tt>.
+     *                      {@code SimpleType}, {@code CompositeType},
+     *                      {@code TabularType} or another {@code ArrayType}
+     *                      with a {@code SimpleType}, {@code CompositeType}
+     *                      or {@code TabularType} as its {@code elementType}.
      *
      * @throws IllegalArgumentException if {@code dimension} is not a positive
      *                                  integer.
@@ -318,19 +327,27 @@
      * returns the {@link SimpleType} corresponding to the wrapper
      * type of the primitive type of the array.
      * <p>
-     * When invoked on an <tt>ArrayType</tt> instance, the {@link OpenType#getClassName() getClassName} method
-     * returns the class name of the array instances it describes (following the rules defined by the
-     * {@link Class#getName() getName} method of <code>java.lang.Class</code>), not the class name of the array elements
-     * (which is returned by a call to <tt>getElementOpenType().getClassName()</tt>).
+     * When invoked on an {@code ArrayType} instance,
+     * the {@link OpenType#getClassName() getClassName} method
+     * returns the class name of the array instances it describes
+     * (following the rules defined by the
+     * {@link Class#getName() getName} method of {@code java.lang.Class}),
+     * not the class name of the array elements
+     * (which is returned by a call to {@code getElementOpenType().getClassName()}).
      * <p>
-     * The internal field corresponding to the type name of this <code>ArrayType</code> instance is also set to
+     * The internal field corresponding to the type name of this
+     * {@code ArrayType} instance is also set to
      * the class name of the array instances it describes.
-     * In other words, the methods <code>getClassName</code> and <code>getTypeName</code> return the same string value.
-     * The internal field corresponding to the description of this <code>ArrayType</code> instance is set to a string value
+     * In other words, the methods {@code getClassName} and
+     * {@code getTypeName} return the same string value.
+     * The internal field corresponding to the description
+     * of this {@code ArrayType} instance is set to a string value
      * which follows the following template:
      * <ul>
-     * <li>if non-primitive array: <tt>1-dimension array of <i>&lt;element_class_name&gt;</i></tt></li>
-     * <li>if primitive array: <tt>1-dimension array of <i>&lt;primitive_type_of_the_element_class_name&gt;</i></tt></li>
+     * <li>if non-primitive array: <code>1-dimension array
+     *     of <i>&lt;element_class_name&gt;</i></code></li>
+     * <li>if primitive array: <code>1-dimension array
+     *     of <i>&lt;primitive_type_of_the_element_class_name&gt;</i></code></li>
      * </ul>
      * <p>
      * As an example, the following piece of code:
@@ -483,7 +500,7 @@
     /* *** ArrayType specific information methods *** */
 
     /**
-     * Returns the dimension of arrays described by this <tt>ArrayType</tt> instance.
+     * Returns the dimension of arrays described by this {@code ArrayType} instance.
      *
      * @return the dimension.
      */
@@ -493,7 +510,8 @@
     }
 
     /**
-     * Returns the <i>open type</i> of element values contained in the arrays described by this <tt>ArrayType</tt> instance.
+     * Returns the <i>open type</i> of element values contained
+     * in the arrays described by this {@code ArrayType} instance.
      *
      * @return the element type.
      */
@@ -503,8 +521,8 @@
     }
 
     /**
-     * Returns <code>true</code> if the open data values this open
-     * type describes are primitive arrays, <code>false</code> otherwise.
+     * Returns {@code true} if the open data values this open
+     * type describes are primitive arrays, {@code false} otherwise.
      *
      * @return true if this is a primitive array type.
      *
@@ -516,32 +534,32 @@
     }
 
     /**
-     * Tests whether <var>obj</var> is a value for this <code>ArrayType</code>
+     * Tests whether <var>obj</var> is a value for this {@code ArrayType}
      * instance.
      * <p>
-     * This method returns <code>true</code> if and only if <var>obj</var>
+     * This method returns {@code true} if and only if <var>obj</var>
      * is not null, <var>obj</var> is an array and any one of the following
-     * is <tt>true</tt>:
+     * is {@code true}:
      *
      * <ul>
-     * <li>if this <code>ArrayType</code> instance describes an array of
-     * <tt>SimpleType</tt> elements or their corresponding primitive types,
+     * <li>if this {@code ArrayType} instance describes an array of
+     * {@code SimpleType} elements or their corresponding primitive types,
      * <var>obj</var>'s class name is the same as the className field defined
-     * for this <code>ArrayType</code> instance (i.e. the class name returned
+     * for this {@code ArrayType} instance (i.e. the class name returned
      * by the {@link OpenType#getClassName() getClassName} method, which
      * includes the dimension information),<br>&nbsp;</li>
-     * <li>if this <code>ArrayType</code> instance describes an array of
+     * <li>if this {@code ArrayType} instance describes an array of
      * classes implementing the {@code TabularData} interface or the
      * {@code CompositeData} interface, <var>obj</var> is assignable to
      * such a declared array, and each element contained in {<var>obj</var>
      * is either null or a valid value for the element's open type specified
-     * by this <code>ArrayType</code> instance.</li>
+     * by this {@code ArrayType} instance.</li>
      * </ul>
      *
      * @param obj the object to be tested.
      *
-     * @return <code>true</code> if <var>obj</var> is a value for this
-     * <code>ArrayType</code> instance.
+     * @return {@code true} if <var>obj</var> is a value for this
+     * {@code ArrayType} instance.
      */
     public boolean isValue(Object obj) {
 
@@ -649,21 +667,21 @@
     /* *** Methods overriden from class Object *** */
 
     /**
-     * Compares the specified <code>obj</code> parameter with this
-     * <code>ArrayType</code> instance for equality.
+     * Compares the specified {@code obj} parameter with this
+     * {@code ArrayType} instance for equality.
      * <p>
-     * Two <code>ArrayType</code> instances are equal if and only if they
+     * Two {@code ArrayType} instances are equal if and only if they
      * describe array instances which have the same dimension, elements'
      * open type and primitive array flag.
      *
      * @param obj the object to be compared for equality with this
-     *            <code>ArrayType</code> instance; if <var>obj</var>
-     *            is <code>null</code> or is not an instance of the
-     *            class <code>ArrayType</code> this method returns
-     *            <code>false</code>.
+     *            {@code ArrayType} instance; if <var>obj</var>
+     *            is {@code null} or is not an instance of the
+     *            class {@code ArrayType} this method returns
+     *            {@code false}.
      *
-     * @return <code>true</code> if the specified object is equal to
-     *         this <code>ArrayType</code> instance.
+     * @return {@code true} if the specified object is equal to
+     *         this {@code ArrayType} instance.
      */
     public boolean equals(Object obj) {
 
@@ -697,25 +715,25 @@
     }
 
     /**
-     * Returns the hash code value for this <code>ArrayType</code> instance.
+     * Returns the hash code value for this {@code ArrayType} instance.
      * <p>
-     * The hash code of an <code>ArrayType</code> instance is the sum of the
-     * hash codes of all the elements of information used in <code>equals</code>
+     * The hash code of an {@code ArrayType} instance is the sum of the
+     * hash codes of all the elements of information used in {@code equals}
      * comparisons (i.e. dimension, elements' open type and primitive array flag).
      * The hashcode for a primitive value is the hashcode of the corresponding boxed
-     * object (e.g. the hashcode for <tt>true</tt> is <tt>Boolean.TRUE.hashCode()</tt>).
-     * This ensures that <code> t1.equals(t2) </code> implies that
-     * <code> t1.hashCode()==t2.hashCode() </code> for any two
-     * <code>ArrayType</code> instances <code>t1</code> and <code>t2</code>,
+     * object (e.g. the hashcode for {@code true} is {@code Boolean.TRUE.hashCode()}).
+     * This ensures that {@code t1.equals(t2)} implies that
+     * {@code t1.hashCode()==t2.hashCode()} for any two
+     * {@code ArrayType} instances {@code t1} and {@code t2},
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
      * <p>
-     * As <code>ArrayType</code> instances are immutable, the hash
+     * As {@code ArrayType} instances are immutable, the hash
      * code for this instance is calculated once, on the first call
-     * to <code>hashCode</code>, and then the same value is returned
+     * to {@code hashCode}, and then the same value is returned
      * for subsequent calls.
      *
-     * @return  the hash code value for this <code>ArrayType</code> instance
+     * @return  the hash code value for this {@code ArrayType} instance
      */
     public int hashCode() {
 
@@ -735,19 +753,19 @@
     }
 
     /**
-     * Returns a string representation of this <code>ArrayType</code> instance.
+     * Returns a string representation of this {@code ArrayType} instance.
      * <p>
      * The string representation consists of the name of this class (i.e.
-     * <code>javax.management.openmbean.ArrayType</code>), the type name,
+     * {@code javax.management.openmbean.ArrayType}), the type name,
      * the dimension, the elements' open type and the primitive array flag
      * defined for this instance.
      * <p>
-     * As <code>ArrayType</code> instances are immutable, the
+     * As {@code ArrayType} instances are immutable, the
      * string representation for this instance is calculated
-     * once, on the first call to <code>toString</code>, and
+     * once, on the first call to {@code toString}, and
      * then the same value is returned for subsequent calls.
      *
-     * @return a string representation of this <code>ArrayType</code> instance
+     * @return a string representation of this {@code ArrayType} instance
      */
     public String toString() {
 
@@ -795,12 +813,12 @@
      *
      * @param <E> the Java type that described instances must have
      * @param  elementType  the <i>open type</i> of element values contained
-     *                      in the arrays described by this <tt>ArrayType</tt>
+     *                      in the arrays described by this {@code ArrayType}
      *                      instance; must be an instance of either
-     *                      <tt>SimpleType</tt>, <tt>CompositeType</tt>,
-     *                      <tt>TabularType</tt> or another <tt>ArrayType</tt>
-     *                      with a <tt>SimpleType</tt>, <tt>CompositeType</tt>
-     *                      or <tt>TabularType</tt> as its <tt>elementType</tt>.
+     *                      {@code SimpleType}, {@code CompositeType},
+     *                      {@code TabularType} or another {@code ArrayType}
+     *                      with a {@code SimpleType}, {@code CompositeType}
+     *                      or {@code TabularType} as its {@code elementType}.
      * @return an {@code ArrayType} instance
      * @throws OpenDataException if <var>elementType's className</var> is not
      *                           one of the allowed Java class names for open
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/CompositeData.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/CompositeData.java	Mon Aug 10 14:05:37 2015 +0300
@@ -36,7 +36,8 @@
 
 
 /**
- * The <tt>CompositeData</tt> interface specifies the behavior of a specific type of complex <i>open data</i> objects
+ * The {@code CompositeData} interface specifies
+ * the behavior of a specific type of complex <i>open data</i> objects
  * which represent <i>composite data</i> structures.
  *
  *
@@ -53,55 +54,60 @@
     public CompositeType getCompositeType();
 
     /**
-     * Returns the value of the item whose name is <tt>key</tt>.
+     * Returns the value of the item whose name is {@code key}.
      *
      * @param key the name of the item.
      *
      * @return the value associated with this key.
      *
-     * @throws IllegalArgumentException  if <tt>key</tt> is a null or empty String.
+     * @throws IllegalArgumentException  if {@code key} is a null or empty String.
      *
-     * @throws InvalidKeyException  if <tt>key</tt> is not an existing item name for this <tt>CompositeData</tt> instance.
+     * @throws InvalidKeyException  if {@code key} is not an
+     *         existing item name for this {@code CompositeData} instance.
      */
     public Object get(String key) ;
 
     /**
-     * Returns an array of the values of the items whose names are specified by <tt>keys</tt>, in the same order as <tt>keys</tt>.
+     * Returns an array of the values of the items whose names
+     * are specified by {@code keys}, in the same order as {@code keys}.
      *
      * @param keys the names of the items.
      *
      * @return the values corresponding to the keys.
      *
-     * @throws IllegalArgumentException  if an element in <tt>keys</tt> is a null or empty String.
+     * @throws IllegalArgumentException  if an element in {@code keys} is a null or empty String.
      *
-     * @throws InvalidKeyException  if an element in <tt>keys</tt> is not an existing item name for this <tt>CompositeData</tt> instance.
+     * @throws InvalidKeyException  if an element in {@code keys}
+     *         is not an existing item name for this {@code CompositeData} instance.
      */
     public Object[] getAll(String[] keys) ;
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>CompositeData</tt> instance contains
-     * an item whose name is <tt>key</tt>.
-     * If <tt>key</tt> is a null or empty String, this method simply returns false.
+     * Returns {@code true} if and only if this {@code CompositeData} instance contains
+     * an item whose name is {@code key}.
+     * If {@code key} is a null or empty String, this method simply returns false.
      *
      * @param key the key to be tested.
      *
-     * @return true if this <tt>CompositeData</tt> contains the key.
+     * @return true if this {@code CompositeData} contains the key.
      */
     public boolean containsKey(String key) ;
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>CompositeData</tt> instance contains an item
-     * whose value is <tt>value</tt>.
+     * Returns {@code true} if and only if this {@code CompositeData} instance contains an item
+     * whose value is {@code value}.
      *
      * @param value the value to be tested.
      *
-     * @return true if this <tt>CompositeData</tt> contains the value.
+     * @return true if this {@code CompositeData} contains the value.
      */
     public boolean containsValue(Object value) ;
 
     /**
-     * Returns an unmodifiable Collection view of the item values contained in this <tt>CompositeData</tt> instance.
-     * The returned collection's iterator will return the values in the ascending lexicographic order of the corresponding
+     * Returns an unmodifiable Collection view of the item values
+     * contained in this {@code CompositeData} instance.
+     * The returned collection's iterator will return the values
+     * in the ascending lexicographic order of the corresponding
      * item names.
      *
      * @return the values.
@@ -110,12 +116,12 @@
 
     /**
      * Compares the specified <var>obj</var> parameter with this
-     * <code>CompositeData</code> instance for equality.
+     * {@code CompositeData} instance for equality.
      * <p>
-     * Returns <tt>true</tt> if and only if all of the following statements are true:
+     * Returns {@code true} if and only if all of the following statements are true:
      * <ul>
      * <li><var>obj</var> is non null,</li>
-     * <li><var>obj</var> also implements the <code>CompositeData</code> interface,</li>
+     * <li><var>obj</var> also implements the {@code CompositeData} interface,</li>
      * <li>their composite types are equal</li>
      * <li>their contents, i.e. (name, value) pairs are equal. If a value contained in
      * the content is an array, the value comparison is done as if by calling
@@ -124,28 +130,28 @@
      * {@code Arrays.equals(e1,e2)} for arrays of primitive types</li>
      * </ul>
      * <p>
-     * This ensures that this <tt>equals</tt> method works properly for
+     * This ensures that this {@code equals} method works properly for
      * <var>obj</var> parameters which are different implementations of the
-     * <code>CompositeData</code> interface, with the restrictions mentioned in the
+     * {@code CompositeData} interface, with the restrictions mentioned in the
      * {@link java.util.Collection#equals(Object) equals}
-     * method of the <tt>java.util.Collection</tt> interface.
+     * method of the {@code java.util.Collection} interface.
      *
      * @param  obj  the object to be compared for equality with this
-     * <code>CompositeData</code> instance.
-     * @return  <code>true</code> if the specified object is equal to this
-     * <code>CompositeData</code> instance.
+     * {@code CompositeData} instance.
+     * @return  {@code true} if the specified object is equal to this
+     * {@code CompositeData} instance.
      */
     public boolean equals(Object obj) ;
 
     /**
-     * Returns the hash code value for this <code>CompositeData</code> instance.
+     * Returns the hash code value for this {@code CompositeData} instance.
      * <p>
-     * The hash code of a <code>CompositeData</code> instance is the sum of the hash codes
-     * of all elements of information used in <code>equals</code> comparisons
+     * The hash code of a {@code CompositeData} instance is the sum of the hash codes
+     * of all elements of information used in {@code equals} comparisons
      * (ie: its <i>composite type</i> and all the item values).
      * <p>
-     * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
-     * for any two <code>CompositeData</code> instances <code>t1</code> and <code>t2</code>,
+     * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+     * for any two {@code CompositeData} instances {@code t1} and {@code t2},
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
      * <p>
@@ -156,18 +162,19 @@
      * for arrays of object reference types or the appropriate overloading
      * of {@code Arrays.hashCode(e)} for arrays of primitive types.
      *
-     * @return the hash code value for this <code>CompositeData</code> instance
+     * @return the hash code value for this {@code CompositeData} instance
      */
     public int hashCode() ;
 
     /**
-     * Returns a string representation of this <code>CompositeData</code> instance.
+     * Returns a string representation of this {@code CompositeData} instance.
      * <p>
      * The string representation consists of the name of the implementing class,
-     * the string representation of the composite type of this instance, and the string representation of the contents
+     * the string representation of the composite type of this instance,
+     * and the string representation of the contents
      * (ie list the itemName=itemValue mappings).
      *
-     * @return  a string representation of this <code>CompositeData</code> instance
+     * @return  a string representation of this {@code CompositeData} instance
      */
     public String toString() ;
 
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/CompositeDataSupport.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/CompositeDataSupport.java	Mon Aug 10 14:05:37 2015 +0300
@@ -45,8 +45,8 @@
 
 
 /**
- * The <tt>CompositeDataSupport</tt> class is the <i>open data</i> class which
- * implements the <tt>CompositeData</tt> interface.
+ * The {@code CompositeDataSupport} class is the <i>open data</i> class which
+ * implements the {@code CompositeData} interface.
  *
  *
  * @since 1.5
@@ -70,15 +70,15 @@
     private final CompositeType compositeType;
 
     /**
-     * <p>Constructs a <tt>CompositeDataSupport</tt> instance with the specified
-     * <tt>compositeType</tt>, whose item values
-     * are specified by <tt>itemValues[]</tt>, in the same order as in
-     * <tt>itemNames[]</tt>.
-     * As a <tt>CompositeType</tt> does not specify any order on its items,
-     * the <tt>itemNames[]</tt> parameter is used
-     * to specify the order in which the values are given in <tt>itemValues[]</tt>.
-     * The items contained in this <tt>CompositeDataSupport</tt> instance are
-     * internally stored in a <tt>TreeMap</tt>,
+     * <p>Constructs a {@code CompositeDataSupport} instance with the specified
+     * {@code compositeType}, whose item values
+     * are specified by {@code itemValues[]}, in the same order as in
+     * {@code itemNames[]}.
+     * As a {@code CompositeType} does not specify any order on its items,
+     * the {@code itemNames[]} parameter is used
+     * to specify the order in which the values are given in {@code itemValues[]}.
+     * The items contained in this {@code CompositeDataSupport} instance are
+     * internally stored in a {@code TreeMap},
      * thus sorted in ascending lexicographic order of their names, for faster
      * retrieval of individual item values.</p>
      *
@@ -89,28 +89,28 @@
      * @param compositeType the <i>composite type </i> of this <i>composite
      * data</i> instance; must not be null.
      *
-     * @param itemNames <tt>itemNames</tt> must list, in any order, all the
-     * item names defined in <tt>compositeType</tt>; the order in which the
-     * names are listed, is used to match values in <tt>itemValues[]</tt>; must
+     * @param itemNames {@code itemNames} must list, in any order, all the
+     * item names defined in {@code compositeType}; the order in which the
+     * names are listed, is used to match values in {@code itemValues[]}; must
      * not be null or empty.
      *
      * @param itemValues the values of the items, listed in the same order as
-     * their respective names in <tt>itemNames</tt>; each item value can be
+     * their respective names in {@code itemNames}; each item value can be
      * null, but if it is non-null it must be a valid value for the open type
-     * defined in <tt>compositeType</tt> for the corresponding item; must be of
-     * the same size as <tt>itemNames</tt>; must not be null or empty.
+     * defined in {@code compositeType} for the corresponding item; must be of
+     * the same size as {@code itemNames}; must not be null or empty.
      *
-     * @throws IllegalArgumentException <tt>compositeType</tt> is null, or
-     * <tt>itemNames[]</tt> or <tt>itemValues[]</tt> is null or empty, or one
-     * of the elements in <tt>itemNames[]</tt> is a null or empty string, or
-     * <tt>itemNames[]</tt> and <tt>itemValues[]</tt> are not of the same size.
+     * @throws IllegalArgumentException {@code compositeType} is null, or
+     * {@code itemNames[]} or {@code itemValues[]} is null or empty, or one
+     * of the elements in {@code itemNames[]} is a null or empty string, or
+     * {@code itemNames[]} and {@code itemValues[]} are not of the same size.
      *
-     * @throws OpenDataException <tt>itemNames[]</tt> or
-     * <tt>itemValues[]</tt>'s size differs from the number of items defined in
-     * <tt>compositeType</tt>, or one of the elements in <tt>itemNames[]</tt>
-     * does not exist as an item name defined in <tt>compositeType</tt>, or one
-     * of the elements in <tt>itemValues[]</tt> is not a valid value for the
-     * corresponding item as defined in <tt>compositeType</tt>.
+     * @throws OpenDataException {@code itemNames[]} or
+     * {@code itemValues[]}'s size differs from the number of items defined in
+     * {@code compositeType}, or one of the elements in {@code itemNames[]}
+     * does not exist as an item name defined in {@code compositeType}, or one
+     * of the elements in {@code itemValues[]} is not a valid value for the
+     * corresponding item as defined in {@code compositeType}.
      */
     public CompositeDataSupport(
             CompositeType compositeType, String[] itemNames, Object[] itemValues)
@@ -147,28 +147,29 @@
 
     /**
      * <p>
-     * Constructs a <tt>CompositeDataSupport</tt> instance with the specified <tt>compositeType</tt>, whose item names and corresponding values
-     * are given by the mappings in the map <tt>items</tt>.
+     * Constructs a {@code CompositeDataSupport} instance with the specified {@code compositeType},
+     * whose item names and corresponding values
+     * are given by the mappings in the map {@code items}.
      * This constructor converts the keys to a string array and the values to an object array and calls
-     * <tt>CompositeDataSupport(javax.management.openmbean.CompositeType, java.lang.String[], java.lang.Object[])</tt>.
+     * {@code CompositeDataSupport(javax.management.openmbean.CompositeType, java.lang.String[], java.lang.Object[])}.
      *
      * @param  compositeType  the <i>composite type </i> of this <i>composite data</i> instance;
      *                        must not be null.
      * @param  items  the mappings of all the item names to their values;
-     *                <tt>items</tt> must contain all the item names defined in <tt>compositeType</tt>;
+     *                {@code items} must contain all the item names defined in {@code compositeType};
      *                must not be null or empty.
      *
-     * @throws IllegalArgumentException <tt>compositeType</tt> is null, or
-     * <tt>items</tt> is null or empty, or one of the keys in <tt>items</tt> is a null
+     * @throws IllegalArgumentException {@code compositeType} is null, or
+     * {@code items} is null or empty, or one of the keys in {@code items} is a null
      * or empty string.
-     * @throws OpenDataException <tt>items</tt>' size differs from the
-     * number of items defined in <tt>compositeType</tt>, or one of the
-     * keys in <tt>items</tt> does not exist as an item name defined in
-     * <tt>compositeType</tt>, or one of the values in <tt>items</tt>
+     * @throws OpenDataException {@code items}' size differs from the
+     * number of items defined in {@code compositeType}, or one of the
+     * keys in {@code items} does not exist as an item name defined in
+     * {@code compositeType}, or one of the values in {@code items}
      * is not a valid value for the corresponding item as defined in
-     * <tt>compositeType</tt>.
-     * @throws ArrayStoreException one or more keys in <tt>items</tt> is not of
-     * the class <tt>java.lang.String</tt>.
+     * {@code compositeType}.
+     * @throws ArrayStoreException one or more keys in {@code items} is not of
+     * the class {@code java.lang.String}.
      */
     public CompositeDataSupport(CompositeType compositeType,
                                 Map<String,?> items)
@@ -253,12 +254,12 @@
     }
 
     /**
-     * Returns the value of the item whose name is <tt>key</tt>.
+     * Returns the value of the item whose name is {@code key}.
      *
-     * @throws IllegalArgumentException  if <tt>key</tt> is a null or empty String.
+     * @throws IllegalArgumentException  if {@code key} is a null or empty String.
      *
-     * @throws InvalidKeyException  if <tt>key</tt> is not an existing item name for
-     * this <tt>CompositeData</tt> instance.
+     * @throws InvalidKeyException  if {@code key} is not an existing item name for
+     * this {@code CompositeData} instance.
      */
     public Object get(String key) {
 
@@ -273,13 +274,13 @@
 
     /**
      * Returns an array of the values of the items whose names are specified by
-     * <tt>keys</tt>, in the same order as <tt>keys</tt>.
+     * {@code keys}, in the same order as {@code keys}.
      *
-     * @throws IllegalArgumentException  if an element in <tt>keys</tt> is a null
+     * @throws IllegalArgumentException  if an element in {@code keys} is a null
      * or empty String.
      *
-     * @throws InvalidKeyException  if an element in <tt>keys</tt> is not an existing
-     * item name for this <tt>CompositeData</tt> instance.
+     * @throws InvalidKeyException  if an element in {@code keys} is not an existing
+     * item name for this {@code CompositeData} instance.
      */
     public Object[] getAll(String[] keys) {
 
@@ -294,9 +295,9 @@
     }
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>CompositeData</tt> instance contains
-     * an item whose name is <tt>key</tt>.
-     * If <tt>key</tt> is a null or empty String, this method simply returns false.
+     * Returns {@code true} if and only if this {@code CompositeData} instance contains
+     * an item whose name is {@code key}.
+     * If {@code key} is a null or empty String, this method simply returns false.
      */
     public boolean containsKey(String key) {
 
@@ -307,9 +308,9 @@
     }
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>CompositeData</tt> instance
+     * Returns {@code true} if and only if this {@code CompositeData} instance
      * contains an item
-     * whose value is <tt>value</tt>.
+     * whose value is {@code value}.
      */
     public boolean containsValue(Object value) {
 
@@ -318,7 +319,7 @@
 
     /**
      * Returns an unmodifiable Collection view of the item values contained in this
-     * <tt>CompositeData</tt> instance.
+     * {@code CompositeData} instance.
      * The returned collection's iterator will return the values in the ascending
      * lexicographic order of the corresponding
      * item names.
@@ -332,7 +333,7 @@
      * Compares the specified <var>obj</var> parameter with this
      * <code>CompositeDataSupport</code> instance for equality.
      * <p>
-     * Returns <tt>true</tt> if and only if all of the following statements are true:
+     * Returns {@code true} if and only if all of the following statements are true:
      * <ul>
      * <li><var>obj</var> is non null,</li>
      * <li><var>obj</var> also implements the <code>CompositeData</code> interface,</li>
@@ -344,11 +345,11 @@
      * {@code Arrays.equals(e1,e2)} for arrays of primitive types</li>
      * </ul>
      * <p>
-     * This ensures that this <tt>equals</tt> method works properly for
+     * This ensures that this {@code equals} method works properly for
      * <var>obj</var> parameters which are different implementations of the
      * <code>CompositeData</code> interface, with the restrictions mentioned in the
      * {@link java.util.Collection#equals(Object) equals}
-     * method of the <tt>java.util.Collection</tt> interface.
+     * method of the {@code java.util.Collection} interface.
      *
      * @param  obj  the object to be compared for equality with this
      * <code>CompositeDataSupport</code> instance.
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -53,27 +53,28 @@
     // (these will be removed when MBeanAttributeInfo is made a parent interface of this interface)
 
     /**
-     * Returns <tt>true</tt> if the attribute described by this <tt>OpenMBeanAttributeInfo</tt> instance is readable,
-     * <tt>false</tt> otherwise.
+     * Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo}
+     * instance is readable, {@code false} otherwise.
      *
      * @return true if the attribute is readable.
      */
     public boolean isReadable() ;
 
     /**
-     * Returns <tt>true</tt> if the attribute described by this <tt>OpenMBeanAttributeInfo</tt> instance is writable,
-     * <tt>false</tt> otherwise.
+     * Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo}
+     * instance is writable, {@code false} otherwise.
      *
      * @return true if the attribute is writable.
      */
     public boolean isWritable() ;
 
     /**
-     * Returns <tt>true</tt> if the attribute described by this <tt>OpenMBeanAttributeInfo</tt> instance
-     * is accessed through a <tt>is<i>XXX</i></tt> getter (applies only to <tt>boolean</tt> and <tt>Boolean</tt> values),
-     * <tt>false</tt> otherwise.
+     * Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo} instance
+     * is accessed through a <code>is<i>XXX</i></code> getter
+     * (applies only to {@code boolean} and {@code Boolean} values),
+     * {@code false} otherwise.
      *
-     * @return true if the attribute is accessed through <tt>is<i>XXX</i></tt>.
+     * @return true if the attribute is accessed through <code>is<i>XXX</i></code>.
      */
     public boolean isIs() ;
 
@@ -82,50 +83,52 @@
     //
 
     /**
-     * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanAttributeInfo</code> instance for equality.
+     * Compares the specified <var>obj</var> parameter with this
+     * {@code OpenMBeanAttributeInfo} instance for equality.
      * <p>
-     * Returns <tt>true</tt> if and only if all of the following statements are true:
+     * Returns {@code true} if and only if all of the following statements are true:
      * <ul>
      * <li><var>obj</var> is non null,</li>
-     * <li><var>obj</var> also implements the <code>OpenMBeanAttributeInfo</code> interface,</li>
+     * <li><var>obj</var> also implements the {@code OpenMBeanAttributeInfo} interface,</li>
      * <li>their names are equal</li>
      * <li>their open types are equal</li>
      * <li>their access properties (isReadable, isWritable and isIs) are equal</li>
      * <li>their default, min, max and legal values are equal.</li>
      * </ul>
-     * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
-     * different implementations of the <code>OpenMBeanAttributeInfo</code> interface.
+     * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are
+     * different implementations of the {@code OpenMBeanAttributeInfo} interface.
      * <br>&nbsp;
-     * @param  obj  the object to be compared for equality with this <code>OpenMBeanAttributeInfo</code> instance;
+     * @param  obj  the object to be compared for equality with this {@code OpenMBeanAttributeInfo} instance;
      *
-     * @return  <code>true</code> if the specified object is equal to this <code>OpenMBeanAttributeInfo</code> instance.
+     * @return  {@code true} if the specified object is equal to this {@code OpenMBeanAttributeInfo} instance.
      */
     public boolean equals(Object obj);
 
     /**
-     * Returns the hash code value for this <code>OpenMBeanAttributeInfo</code> instance.
+     * Returns the hash code value for this {@code OpenMBeanAttributeInfo} instance.
      * <p>
-     * The hash code of an <code>OpenMBeanAttributeInfo</code> instance is the sum of the hash codes
-     * of all elements of information used in <code>equals</code> comparisons
+     * The hash code of an {@code OpenMBeanAttributeInfo} instance is the sum of the hash codes
+     * of all elements of information used in {@code equals} comparisons
      * (ie: its name, its <i>open type</i>, and its default, min, max and legal values).
      * <p>
-     * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
-     * for any two <code>OpenMBeanAttributeInfo</code> instances <code>t1</code> and <code>t2</code>,
+     * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+     * for any two {@code OpenMBeanAttributeInfo} instances {@code t1} and {@code t2},
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
      *
-     * @return  the hash code value for this <code>OpenMBeanAttributeInfo</code> instance
+     * @return  the hash code value for this {@code OpenMBeanAttributeInfo} instance
      */
     public int hashCode();
 
     /**
-     * Returns a string representation of this <code>OpenMBeanAttributeInfo</code> instance.
+     * Returns a string representation of this {@code OpenMBeanAttributeInfo} instance.
      * <p>
-     * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanAttributeInfo</code>),
+     * The string representation consists of the name of this class
+     * (ie {@code javax.management.openmbean.OpenMBeanAttributeInfo}),
      * the string representation of the name and open type of the described attribute,
      * and the string representation of its default, min, max and legal values.
      *
-     * @return  a string representation of this <code>OpenMBeanAttributeInfo</code> instance
+     * @return  a string representation of this {@code OpenMBeanAttributeInfo} instance
      */
     public String toString();
 
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	Mon Aug 10 14:05:37 2015 +0300
@@ -114,7 +114,7 @@
      * exposed for management.
      *
      * @param isIs {@code true} if the attribute's getter is of the
-     * form <tt>is<i>XXX</i></tt>.
+     * form <code>is<i>XXX</i></code>.
      *
      * @throws IllegalArgumentException if {@code name} or {@code
      * description} are null or empty string, or {@code openType} is
@@ -154,7 +154,7 @@
      * exposed for management.
      *
      * @param isIs {@code true} if the attribute's getter is of the
-     * form <tt>is<i>XXX</i></tt>.
+     * form <code>is<i>XXX</i></code>.
      *
      * @param descriptor The descriptor for the attribute.  This may be null
      * which is equivalent to an empty descriptor.
@@ -221,7 +221,7 @@
      * exposed for management.
      *
      * @param isIs {@code true} if the attribute's getter is of the
-     * form <tt>is<i>XXX</i></tt>.
+     * form <code>is<i>XXX</i></code>.
      *
      * @param defaultValue must be a valid value for the {@code
      * openType} specified for this attribute; default value not
@@ -278,7 +278,7 @@
      * exposed for management.
      *
      * @param isIs {@code true} if the attribute's getter is of the
-     * form <tt>is<i>XXX</i></tt>.
+     * form <code>is<i>XXX</i></code>.
      *
      * @param defaultValue must be a valid value
      * for the {@code
@@ -345,7 +345,7 @@
      * exposed for management.
      *
      * @param isIs {@code true} if the attribute's getter is of the
-     * form <tt>is<i>XXX</i></tt>.
+     * form <code>is<i>XXX</i></code>.
      *
      * @param defaultValue must be a valid value for the {@code
      * openType} specified for this attribute; default value not
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanConstructorInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanConstructorInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -60,7 +60,7 @@
 
     /**
      * Returns a human readable description of the constructor
-     * described by this <tt>OpenMBeanConstructorInfo</tt> instance.
+     * described by this {@code OpenMBeanConstructorInfo} instance.
      *
      * @return the description.
      */
@@ -68,16 +68,16 @@
 
     /**
      * Returns the name of the constructor
-     * described by this <tt>OpenMBeanConstructorInfo</tt> instance.
+     * described by this {@code OpenMBeanConstructorInfo} instance.
      *
      * @return the name.
      */
     public String getName() ;
 
     /**
-     * Returns an array of <tt>OpenMBeanParameterInfo</tt> instances
+     * Returns an array of {@code OpenMBeanParameterInfo} instances
      * describing each parameter in the signature of the constructor
-     * described by this <tt>OpenMBeanConstructorInfo</tt> instance.
+     * described by this {@code OpenMBeanConstructorInfo} instance.
      *
      * @return the signature.
      */
@@ -88,48 +88,49 @@
     //
 
     /**
-     * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanConstructorInfo</code> instance for equality.
+     * Compares the specified <var>obj</var> parameter with this {@code OpenMBeanConstructorInfo} instance for equality.
      * <p>
-     * Returns <tt>true</tt> if and only if all of the following statements are true:
+     * Returns {@code true} if and only if all of the following statements are true:
      * <ul>
      * <li><var>obj</var> is non null,</li>
-     * <li><var>obj</var> also implements the <code>OpenMBeanConstructorInfo</code> interface,</li>
+     * <li><var>obj</var> also implements the {@code OpenMBeanConstructorInfo} interface,</li>
      * <li>their names are equal</li>
      * <li>their signatures are equal.</li>
      * </ul>
-     * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
-     * different implementations of the <code>OpenMBeanConstructorInfo</code> interface.
+     * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are
+     * different implementations of the {@code OpenMBeanConstructorInfo} interface.
      * <br>&nbsp;
-     * @param  obj  the object to be compared for equality with this <code>OpenMBeanConstructorInfo</code> instance;
+     * @param  obj  the object to be compared for equality with this {@code OpenMBeanConstructorInfo} instance;
      *
-     * @return  <code>true</code> if the specified object is equal to this <code>OpenMBeanConstructorInfo</code> instance.
+     * @return  {@code true} if the specified object is equal to this {@code OpenMBeanConstructorInfo} instance.
      */
     public boolean equals(Object obj);
 
     /**
-     * Returns the hash code value for this <code>OpenMBeanConstructorInfo</code> instance.
+     * Returns the hash code value for this {@code OpenMBeanConstructorInfo} instance.
      * <p>
-     * The hash code of an <code>OpenMBeanConstructorInfo</code> instance is the sum of the hash codes
-     * of all elements of information used in <code>equals</code> comparisons
+     * The hash code of an {@code OpenMBeanConstructorInfo} instance is the sum of the hash codes
+     * of all elements of information used in {@code equals} comparisons
      * (ie: its name and signature, where the signature hashCode is calculated by a call to
-     *  <tt>java.util.Arrays.asList(this.getSignature).hashCode()</tt>).
+     *  {@code java.util.Arrays.asList(this.getSignature).hashCode()}).
      * <p>
-     * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
-     * for any two <code>OpenMBeanConstructorInfo</code> instances <code>t1</code> and <code>t2</code>,
+     * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+     * for any two {@code OpenMBeanConstructorInfo} instances {@code t1} and {@code t2},
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
      *
-     * @return  the hash code value for this <code>OpenMBeanConstructorInfo</code> instance
+     * @return  the hash code value for this {@code OpenMBeanConstructorInfo} instance
      */
     public int hashCode();
 
     /**
-     * Returns a string representation of this <code>OpenMBeanConstructorInfo</code> instance.
+     * Returns a string representation of this {@code OpenMBeanConstructorInfo} instance.
      * <p>
-     * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanConstructorInfo</code>),
+     * The string representation consists of the name of this class
+     * (ie {@code javax.management.openmbean.OpenMBeanConstructorInfo}),
      * and the name and signature of the described constructor.
      *
-     * @return  a string representation of this <code>OpenMBeanConstructorInfo</code> instance
+     * @return  a string representation of this {@code OpenMBeanConstructorInfo} instance
      */
     public String toString();
 
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -70,7 +70,7 @@
 
     /**
      * Returns the fully qualified Java class name of the open MBean
-     * instances this <tt>OpenMBeanInfo</tt> describes.
+     * instances this {@code OpenMBeanInfo} describes.
      *
      * @return the class name.
      */
@@ -78,19 +78,19 @@
 
     /**
      * Returns a human readable description of the type of open MBean
-     * instances this <tt>OpenMBeanInfo</tt> describes.
+     * instances this {@code OpenMBeanInfo} describes.
      *
      * @return the description.
      */
     public String getDescription() ;
 
     /**
-     * Returns an array of <tt>OpenMBeanAttributeInfo</tt> instances
+     * Returns an array of {@code OpenMBeanAttributeInfo} instances
      * describing each attribute in the open MBean described by this
-     * <tt>OpenMBeanInfo</tt> instance.  Each instance in the returned
+     * {@code OpenMBeanInfo} instance.  Each instance in the returned
      * array should actually be a subclass of
-     * <tt>MBeanAttributeInfo</tt> which implements the
-     * <tt>OpenMBeanAttributeInfo</tt> interface (typically {@link
+     * {@code MBeanAttributeInfo} which implements the
+     * {@code OpenMBeanAttributeInfo} interface (typically {@link
      * OpenMBeanAttributeInfoSupport}).
      *
      * @return the attribute array.
@@ -98,12 +98,12 @@
     public MBeanAttributeInfo[] getAttributes() ;
 
     /**
-     * Returns an array of <tt>OpenMBeanOperationInfo</tt> instances
+     * Returns an array of {@code OpenMBeanOperationInfo} instances
      * describing each operation in the open MBean described by this
-     * <tt>OpenMBeanInfo</tt> instance.  Each instance in the returned
+     * {@code OpenMBeanInfo} instance.  Each instance in the returned
      * array should actually be a subclass of
-     * <tt>MBeanOperationInfo</tt> which implements the
-     * <tt>OpenMBeanOperationInfo</tt> interface (typically {@link
+     * {@code MBeanOperationInfo} which implements the
+     * {@code OpenMBeanOperationInfo} interface (typically {@link
      * OpenMBeanOperationInfoSupport}).
      *
      * @return the operation array.
@@ -111,12 +111,12 @@
     public MBeanOperationInfo[] getOperations() ;
 
     /**
-     * Returns an array of <tt>OpenMBeanConstructorInfo</tt> instances
+     * Returns an array of {@code OpenMBeanConstructorInfo} instances
      * describing each constructor in the open MBean described by this
-     * <tt>OpenMBeanInfo</tt> instance.  Each instance in the returned
+     * {@code OpenMBeanInfo} instance.  Each instance in the returned
      * array should actually be a subclass of
-     * <tt>MBeanConstructorInfo</tt> which implements the
-     * <tt>OpenMBeanConstructorInfo</tt> interface (typically {@link
+     * {@code MBeanConstructorInfo} which implements the
+     * {@code OpenMBeanConstructorInfo} interface (typically {@link
      * OpenMBeanConstructorInfoSupport}).
      *
      * @return the constructor array.
@@ -124,9 +124,9 @@
     public MBeanConstructorInfo[] getConstructors() ;
 
     /**
-     * Returns an array of <tt>MBeanNotificationInfo</tt> instances
+     * Returns an array of {@code MBeanNotificationInfo} instances
      * describing each notification emitted by the open MBean
-     * described by this <tt>OpenMBeanInfo</tt> instance.
+     * described by this {@code OpenMBeanInfo} instance.
      *
      * @return the notification array.
      */
@@ -137,50 +137,51 @@
     //
 
     /**
-     * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanInfo</code> instance for equality.
+     * Compares the specified <var>obj</var> parameter with this {@code OpenMBeanInfo} instance for equality.
      * <p>
-     * Returns <tt>true</tt> if and only if all of the following statements are true:
+     * Returns {@code true} if and only if all of the following statements are true:
      * <ul>
      * <li><var>obj</var> is non null,</li>
-     * <li><var>obj</var> also implements the <code>OpenMBeanInfo</code> interface,</li>
+     * <li><var>obj</var> also implements the {@code OpenMBeanInfo} interface,</li>
      * <li>their class names are equal</li>
      * <li>their infos on attributes, constructors, operations and notifications are equal</li>
      * </ul>
-     * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
-     * different implementations of the <code>OpenMBeanInfo</code> interface.
-     * <br>&nbsp;
-     * @param  obj  the object to be compared for equality with this <code>OpenMBeanInfo</code> instance;
+     * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are
+     * different implementations of the {@code OpenMBeanInfo} interface.
      *
-     * @return  <code>true</code> if the specified object is equal to this <code>OpenMBeanInfo</code> instance.
+     * @param  obj  the object to be compared for equality with this {@code OpenMBeanInfo} instance;
+     *
+     * @return  {@code true} if the specified object is equal to this {@code OpenMBeanInfo} instance.
      */
     public boolean equals(Object obj);
 
     /**
-     * Returns the hash code value for this <code>OpenMBeanInfo</code> instance.
+     * Returns the hash code value for this {@code OpenMBeanInfo} instance.
      * <p>
-     * The hash code of an <code>OpenMBeanInfo</code> instance is the sum of the hash codes
-     * of all elements of information used in <code>equals</code> comparisons
+     * The hash code of an {@code OpenMBeanInfo} instance is the sum of the hash codes
+     * of all elements of information used in {@code equals} comparisons
      * (ie: its class name, and its infos on attributes, constructors, operations and notifications,
      * where the hashCode of each of these arrays is calculated by a call to
-     *  <tt>new java.util.HashSet(java.util.Arrays.asList(this.getSignature)).hashCode()</tt>).
+     * {@code new java.util.HashSet(java.util.Arrays.asList(this.getSignature)).hashCode()}).
      * <p>
-     * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
-     * for any two <code>OpenMBeanInfo</code> instances <code>t1</code> and <code>t2</code>,
+     * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+     * for any two {@code OpenMBeanInfo} instances {@code t1} and {@code t2},
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
      *
-     * @return  the hash code value for this <code>OpenMBeanInfo</code> instance
+     * @return  the hash code value for this {@code OpenMBeanInfo} instance
      */
     public int hashCode();
 
     /**
-     * Returns a string representation of this <code>OpenMBeanInfo</code> instance.
+     * Returns a string representation of this {@code OpenMBeanInfo} instance.
      * <p>
-     * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanInfo</code>),
-     * the MBean class name,
-     * and the string representation of infos on attributes, constructors, operations and notifications of the described MBean.
+     * The string representation consists of the name of this class
+     * (ie {@code javax.management.openmbean.OpenMBeanInfo}), the MBean class name,
+     * and the string representation of infos on attributes, constructors,
+     * operations and notifications of the described MBean.
      *
-     * @return  a string representation of this <code>OpenMBeanInfo</code> instance
+     * @return  a string representation of this {@code OpenMBeanInfo} instance
      */
     public String toString();
 
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanOperationInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanOperationInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -58,7 +58,7 @@
 
     /**
      * Returns a human readable description of the operation
-     * described by this <tt>OpenMBeanOperationInfo</tt> instance.
+     * described by this {@code OpenMBeanOperationInfo} instance.
      *
      * @return the description.
      */
@@ -66,19 +66,19 @@
 
     /**
      * Returns the name of the operation
-     * described by this <tt>OpenMBeanOperationInfo</tt> instance.
+     * described by this {@code OpenMBeanOperationInfo} instance.
      *
      * @return the name.
      */
     public String getName() ;
 
     /**
-     * Returns an array of <tt>OpenMBeanParameterInfo</tt> instances
+     * Returns an array of {@code OpenMBeanParameterInfo} instances
      * describing each parameter in the signature of the operation
-     * described by this <tt>OpenMBeanOperationInfo</tt> instance.
+     * described by this {@code OpenMBeanOperationInfo} instance.
      * Each instance in the returned array should actually be a
-     * subclass of <tt>MBeanParameterInfo</tt> which implements the
-     * <tt>OpenMBeanParameterInfo</tt> interface (typically {@link
+     * subclass of {@code MBeanParameterInfo} which implements the
+     * {@code OpenMBeanParameterInfo} interface (typically {@link
      * OpenMBeanParameterInfoSupport}).
      *
      * @return the signature.
@@ -86,8 +86,8 @@
     public MBeanParameterInfo[] getSignature() ;
 
     /**
-     * Returns an <tt>int</tt> constant qualifying the impact of the
-     * operation described by this <tt>OpenMBeanOperationInfo</tt>
+     * Returns an {@code int} constant qualifying the impact of the
+     * operation described by this {@code OpenMBeanOperationInfo}
      * instance.
      *
      * The returned constant is one of {@link
@@ -103,9 +103,9 @@
     /**
      * Returns the fully qualified Java class name of the values
      * returned by the operation described by this
-     * <tt>OpenMBeanOperationInfo</tt> instance.  This method should
+     * {@code OpenMBeanOperationInfo} instance.  This method should
      * return the same value as a call to
-     * <tt>getReturnOpenType().getClassName()</tt>.
+     * {@code getReturnOpenType().getClassName()}.
      *
      * @return the return type.
      */
@@ -117,7 +117,7 @@
 
     /**
      * Returns the <i>open type</i> of the values returned by the
-     * operation described by this <tt>OpenMBeanOperationInfo</tt>
+     * operation described by this {@code OpenMBeanOperationInfo}
      * instance.
      *
      * @return the return type.
@@ -129,51 +129,53 @@
     //
 
     /**
-     * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanOperationInfo</code> instance for equality.
+     * Compares the specified <var>obj</var> parameter with this {@code OpenMBeanOperationInfo} instance for equality.
      * <p>
-     * Returns <tt>true</tt> if and only if all of the following statements are true:
+     * Returns {@code true} if and only if all of the following statements are true:
      * <ul>
      * <li><var>obj</var> is non null,</li>
-     * <li><var>obj</var> also implements the <code>OpenMBeanOperationInfo</code> interface,</li>
+     * <li><var>obj</var> also implements the {@code OpenMBeanOperationInfo} interface,</li>
      * <li>their names are equal</li>
      * <li>their signatures are equal</li>
      * <li>their return open types are equal</li>
      * <li>their impacts are equal</li>
      * </ul>
-     * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
-     * different implementations of the <code>OpenMBeanOperationInfo</code> interface.
+     * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are
+     * different implementations of the {@code OpenMBeanOperationInfo} interface.
      * <br>&nbsp;
-     * @param  obj  the object to be compared for equality with this <code>OpenMBeanOperationInfo</code> instance;
+     * @param  obj  the object to be compared for equality with this {@code OpenMBeanOperationInfo} instance;
      *
-     * @return  <code>true</code> if the specified object is equal to this <code>OpenMBeanOperationInfo</code> instance.
+     * @return  {@code true} if the specified object is equal to this {@code OpenMBeanOperationInfo} instance.
      */
     public boolean equals(Object obj);
 
     /**
-     * Returns the hash code value for this <code>OpenMBeanOperationInfo</code> instance.
+     * Returns the hash code value for this {@code OpenMBeanOperationInfo} instance.
      * <p>
-     * The hash code of an <code>OpenMBeanOperationInfo</code> instance is the sum of the hash codes
-     * of all elements of information used in <code>equals</code> comparisons
-     * (ie: its name, return open type, impact and signature, where the signature hashCode is calculated by a call to
-     *  <tt>java.util.Arrays.asList(this.getSignature).hashCode()</tt>).
+     * The hash code of an {@code OpenMBeanOperationInfo} instance is the sum of the hash codes
+     * of all elements of information used in {@code equals} comparisons
+     * (ie: its name, return open type, impact and signature,
+     * where the signature hashCode is calculated by a call to
+     * {@code java.util.Arrays.asList(this.getSignature).hashCode()}).
      * <p>
-     * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
-     * for any two <code>OpenMBeanOperationInfo</code> instances <code>t1</code> and <code>t2</code>,
+     * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+     * for any two {@code OpenMBeanOperationInfo} instances {@code t1} and {@code t2},
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
      *
      *
-     * @return  the hash code value for this <code>OpenMBeanOperationInfo</code> instance
+     * @return  the hash code value for this {@code OpenMBeanOperationInfo} instance
      */
     public int hashCode();
 
     /**
-     * Returns a string representation of this <code>OpenMBeanOperationInfo</code> instance.
+     * Returns a string representation of this {@code OpenMBeanOperationInfo} instance.
      * <p>
-     * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanOperationInfo</code>),
+     * The string representation consists of the name of this class
+     * (ie {@code javax.management.openmbean.OpenMBeanOperationInfo}),
      * and the name, signature, return open type and impact of the described operation.
      *
-     * @return  a string representation of this <code>OpenMBeanOperationInfo</code> instance
+     * @return  a string representation of this {@code OpenMBeanOperationInfo} instance
      */
     public String toString();
 
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanParameterInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanParameterInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -57,7 +57,7 @@
 
     /**
      * Returns a human readable description of the parameter
-     * described by this <tt>OpenMBeanParameterInfo</tt> instance.
+     * described by this {@code OpenMBeanParameterInfo} instance.
      *
      * @return the description.
      */
@@ -65,7 +65,7 @@
 
     /**
      * Returns the name of the parameter
-     * described by this <tt>OpenMBeanParameterInfo</tt> instance.
+     * described by this {@code OpenMBeanParameterInfo} instance.
      *
      * @return the name.
      */
@@ -77,7 +77,7 @@
 
     /**
      * Returns the <i>open type</i> of the values of the parameter
-     * described by this <tt>OpenMBeanParameterInfo</tt> instance.
+     * described by this {@code OpenMBeanParameterInfo} instance.
      *
      * @return the open type.
      */
@@ -85,7 +85,7 @@
 
     /**
      * Returns the default value for this parameter, if it has one, or
-     * <tt>null</tt> otherwise.
+     * {@code null} otherwise.
      *
      * @return the default value.
      */
@@ -93,7 +93,7 @@
 
     /**
      * Returns the set of legal values for this parameter, if it has
-     * one, or <tt>null</tt> otherwise.
+     * one, or {@code null} otherwise.
      *
      * @return the set of legal values.
      */
@@ -101,7 +101,7 @@
 
     /**
      * Returns the minimal value for this parameter, if it has one, or
-     * <tt>null</tt> otherwise.
+     * {@code null} otherwise.
      *
      * @return the minimum value.
      */
@@ -109,39 +109,39 @@
 
     /**
      * Returns the maximal value for this parameter, if it has one, or
-     * <tt>null</tt> otherwise.
+     * {@code null} otherwise.
      *
      * @return the maximum value.
      */
     public Comparable<?> getMaxValue() ;
 
     /**
-     * Returns <tt>true</tt> if this parameter has a specified default
-     * value, or <tt>false</tt> otherwise.
+     * Returns {@code true} if this parameter has a specified default
+     * value, or {@code false} otherwise.
      *
      * @return true if there is a default value.
      */
     public boolean hasDefaultValue() ;
 
     /**
-     * Returns <tt>true</tt> if this parameter has a specified set of
-     * legal values, or <tt>false</tt> otherwise.
+     * Returns {@code true} if this parameter has a specified set of
+     * legal values, or {@code false} otherwise.
      *
      * @return true if there is a set of legal values.
      */
     public boolean hasLegalValues() ;
 
     /**
-     * Returns <tt>true</tt> if this parameter has a specified minimal
-     * value, or <tt>false</tt> otherwise.
+     * Returns {@code true} if this parameter has a specified minimal
+     * value, or {@code false} otherwise.
      *
      * @return true if there is a minimum value.
      */
     public boolean hasMinValue() ;
 
     /**
-     * Returns <tt>true</tt> if this parameter has a specified maximal
-     * value, or <tt>false</tt> otherwise.
+     * Returns {@code true} if this parameter has a specified maximal
+     * value, or {@code false} otherwise.
      *
      * @return true if there is a maximum value.
      */
@@ -149,62 +149,62 @@
 
     /**
      * Tests whether <var>obj</var> is a valid value for the parameter
-     * described by this <code>OpenMBeanParameterInfo</code> instance.
+     * described by this {@code OpenMBeanParameterInfo} instance.
      *
      * @param obj the object to be tested.
      *
-     * @return <code>true</code> if <var>obj</var> is a valid value
+     * @return {@code true} if <var>obj</var> is a valid value
      * for the parameter described by this
-     * <code>OpenMBeanParameterInfo</code> instance,
-     * <code>false</code> otherwise.
+     * {@code OpenMBeanParameterInfo} instance,
+     * {@code false} otherwise.
      */
     public boolean isValue(Object obj) ;
 
 
     /**
-     * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanParameterInfo</code> instance for equality.
+     * Compares the specified <var>obj</var> parameter with this {@code OpenMBeanParameterInfo} instance for equality.
      * <p>
-     * Returns <tt>true</tt> if and only if all of the following statements are true:
+     * Returns {@code true} if and only if all of the following statements are true:
      * <ul>
      * <li><var>obj</var> is non null,</li>
-     * <li><var>obj</var> also implements the <code>OpenMBeanParameterInfo</code> interface,</li>
+     * <li><var>obj</var> also implements the {@code OpenMBeanParameterInfo} interface,</li>
      * <li>their names are equal</li>
      * <li>their open types are equal</li>
      * <li>their default, min, max and legal values are equal.</li>
      * </ul>
-     * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
-     * different implementations of the <code>OpenMBeanParameterInfo</code> interface.
+     * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are
+     * different implementations of the {@code OpenMBeanParameterInfo} interface.
      * <br>&nbsp;
-     * @param  obj  the object to be compared for equality with this <code>OpenMBeanParameterInfo</code> instance;
+     * @param  obj  the object to be compared for equality with this {@code OpenMBeanParameterInfo} instance;
      *
-     * @return  <code>true</code> if the specified object is equal to this <code>OpenMBeanParameterInfo</code> instance.
+     * @return  {@code true} if the specified object is equal to this {@code OpenMBeanParameterInfo} instance.
      */
     public boolean equals(Object obj);
 
     /**
-     * Returns the hash code value for this <code>OpenMBeanParameterInfo</code> instance.
+     * Returns the hash code value for this {@code OpenMBeanParameterInfo} instance.
      * <p>
-     * The hash code of an <code>OpenMBeanParameterInfo</code> instance is the sum of the hash codes
-     * of all elements of information used in <code>equals</code> comparisons
+     * The hash code of an {@code OpenMBeanParameterInfo} instance is the sum of the hash codes
+     * of all elements of information used in {@code equals} comparisons
      * (ie: its name, its <i>open type</i>, and its default, min, max and legal values).
      * <p>
-     * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
-     * for any two <code>OpenMBeanParameterInfo</code> instances <code>t1</code> and <code>t2</code>,
+     * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+     * for any two {@code OpenMBeanParameterInfo} instances {@code t1} and {@code t2},
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
      *
-     * @return  the hash code value for this <code>OpenMBeanParameterInfo</code> instance
+     * @return  the hash code value for this {@code OpenMBeanParameterInfo} instance
      */
     public int hashCode();
 
     /**
-     * Returns a string representation of this <code>OpenMBeanParameterInfo</code> instance.
+     * Returns a string representation of this {@code OpenMBeanParameterInfo} instance.
      * <p>
-     * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanParameterInfo</code>),
+     * The string representation consists of the name of this class (ie {@code javax.management.openmbean.OpenMBeanParameterInfo}),
      * the string representation of the name and open type of the described parameter,
      * and the string representation of its default, min, max and legal values.
      *
-     * @return  a string representation of this <code>OpenMBeanParameterInfo</code> instance
+     * @return  a string representation of this {@code OpenMBeanParameterInfo} instance
      */
     public String toString();
 
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/TabularData.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/TabularData.java	Mon Aug 10 14:05:37 2015 +0300
@@ -37,7 +37,7 @@
 
 
 /**
- * The <tt>TabularData</tt> interface specifies the behavior of a specific type of complex <i>open data</i> objects
+ * The {@code TabularData} interface specifies the behavior of a specific type of complex <i>open data</i> objects
  * which represent <i>tabular data</i> structures.
  *
  * @since 1.5
@@ -50,7 +50,7 @@
 
     /**
      * Returns the <i>tabular type</i> describing this
-     * <tt>TabularData</tt> instance.
+     * {@code TabularData} instance.
      *
      * @return the tabular type.
      */
@@ -58,21 +58,21 @@
 
 
     /**
-     * Calculates the index that would be used in this <tt>TabularData</tt> instance to refer to the specified
+     * Calculates the index that would be used in this {@code TabularData} instance to refer to the specified
      * composite data <var>value</var> parameter if it were added to this instance.
      * This method checks for the type validity of the specified <var>value</var>,
-     * but does not check if the calculated index is already used to refer to a value in this <tt>TabularData</tt> instance.
+     * but does not check if the calculated index is already used to refer to a value in this {@code TabularData} instance.
      *
      * @param  value                      the composite data value whose index in this
-     *                                    <tt>TabularData</tt> instance is to be calculated;
+     *                                    {@code TabularData} instance is to be calculated;
      *                                    must be of the same composite type as this instance's row type;
      *                                    must not be null.
      *
-     * @return the index that the specified <var>value</var> would have in this <tt>TabularData</tt> instance.
+     * @return the index that the specified <var>value</var> would have in this {@code TabularData} instance.
      *
-     * @throws NullPointerException       if <var>value</var> is <tt>null</tt>
+     * @throws NullPointerException       if <var>value</var> is {@code null}
      *
-     * @throws InvalidOpenTypeException   if <var>value</var> does not conform to this <tt>TabularData</tt> instance's
+     * @throws InvalidOpenTypeException   if <var>value</var> does not conform to this {@code TabularData} instance's
      *                                    row type definition.
      */
     public Object[] calculateIndex(CompositeData value) ;
@@ -83,8 +83,8 @@
     /* *** Content information query methods *** */
 
     /**
-     * Returns the number of <tt>CompositeData</tt> values (ie the
-     * number of rows) contained in this <tt>TabularData</tt>
+     * Returns the number of {@code CompositeData} values (ie the
+     * number of rows) contained in this {@code TabularData}
      * instance.
      *
      * @return the number of values contained.
@@ -92,50 +92,50 @@
     public int size() ;
 
     /**
-     * Returns <tt>true</tt> if the number of <tt>CompositeData</tt>
+     * Returns {@code true} if the number of {@code CompositeData}
      * values (ie the number of rows) contained in this
-     * <tt>TabularData</tt> instance is zero.
+     * {@code TabularData} instance is zero.
      *
-     * @return true if this <tt>TabularData</tt> is empty.
+     * @return true if this {@code TabularData} is empty.
      */
     public boolean isEmpty() ;
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains a <tt>CompositeData</tt> value
-     * (ie a row) whose index is the specified <var>key</var>. If <var>key</var> is <tt>null</tt> or does not conform to
-     * this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition, this method simply returns <tt>false</tt>.
+     * Returns {@code true} if and only if this {@code TabularData} instance contains a {@code CompositeData} value
+     * (ie a row) whose index is the specified <var>key</var>. If <var>key</var> is {@code null} or does not conform to
+     * this {@code TabularData} instance's {@code TabularType} definition, this method simply returns {@code false}.
      *
-     * @param  key  the index value whose presence in this <tt>TabularData</tt> instance is to be tested.
+     * @param  key  the index value whose presence in this {@code TabularData} instance is to be tested.
      *
-     * @return  <tt>true</tt> if this <tt>TabularData</tt> indexes a row value with the specified key.
+     * @return  {@code true} if this {@code TabularData} indexes a row value with the specified key.
      */
     public boolean containsKey(Object[] key) ;
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains the specified
-     * <tt>CompositeData</tt> value. If <var>value</var> is <tt>null</tt> or does not conform to
-     * this <tt>TabularData</tt> instance's row type definition, this method simply returns <tt>false</tt>.
+     * Returns {@code true} if and only if this {@code TabularData} instance contains the specified
+     * {@code CompositeData} value. If <var>value</var> is {@code null} or does not conform to
+     * this {@code TabularData} instance's row type definition, this method simply returns {@code false}.
      *
-     * @param  value  the row value whose presence in this <tt>TabularData</tt> instance is to be tested.
+     * @param  value  the row value whose presence in this {@code TabularData} instance is to be tested.
      *
-     * @return  <tt>true</tt> if this <tt>TabularData</tt> instance contains the specified row value.
+     * @return  {@code true} if this {@code TabularData} instance contains the specified row value.
      */
     public boolean containsValue(CompositeData value) ;
 
     /**
-     * Returns the <tt>CompositeData</tt> value whose index is
-     * <var>key</var>, or <tt>null</tt> if there is no value mapping
-     * to <var>key</var>, in this <tt>TabularData</tt> instance.
+     * Returns the {@code CompositeData} value whose index is
+     * <var>key</var>, or {@code null} if there is no value mapping
+     * to <var>key</var>, in this {@code TabularData} instance.
      *
      * @param key the key of the row to return.
      *
      * @return the value corresponding to <var>key</var>.
      *
      * @throws NullPointerException if the <var>key</var> is
-     * <tt>null</tt>
+     * {@code null}
      * @throws InvalidKeyException if the <var>key</var> does not
-     * conform to this <tt>TabularData</tt> instance's *
-     * <tt>TabularType</tt> definition
+     * conform to this {@code TabularData} instance's *
+     * {@code TabularType} definition
      */
     public CompositeData get(Object[] key) ;
 
@@ -146,45 +146,45 @@
 
 
     /**
-     * Adds <var>value</var> to this <tt>TabularData</tt> instance.
+     * Adds <var>value</var> to this {@code TabularData} instance.
      * The composite type of <var>value</var> must be the same as this
      * instance's row type (ie the composite type returned by
-     * <tt>this.getTabularType().{@link TabularType#getRowType
-     * getRowType()}</tt>), and there must not already be an existing
-     * value in this <tt>TabularData</tt> instance whose index is the
+     * <code>this.getTabularType().{@link TabularType#getRowType
+     * getRowType()}</code>), and there must not already be an existing
+     * value in this {@code TabularData} instance whose index is the
      * same as the one calculated for the <var>value</var> to be
      * added. The index for <var>value</var> is calculated according
-     * to this <tt>TabularData</tt> instance's <tt>TabularType</tt>
-     * definition (see <tt>TabularType.{@link
-     * TabularType#getIndexNames getIndexNames()}</tt>).
+     * to this {@code TabularData} instance's {@code TabularType}
+     * definition (see <code>TabularType.{@link
+     * TabularType#getIndexNames getIndexNames()}</code>).
      *
-     * @param  value                      the composite data value to be added as a new row to this <tt>TabularData</tt> instance;
+     * @param  value                      the composite data value to be added as a new row to this {@code TabularData} instance;
      *                                    must be of the same composite type as this instance's row type;
      *                                    must not be null.
      *
-     * @throws NullPointerException       if <var>value</var> is <tt>null</tt>
-     * @throws InvalidOpenTypeException   if <var>value</var> does not conform to this <tt>TabularData</tt> instance's
+     * @throws NullPointerException       if <var>value</var> is {@code null}
+     * @throws InvalidOpenTypeException   if <var>value</var> does not conform to this {@code TabularData} instance's
      *                                    row type definition.
      * @throws KeyAlreadyExistsException  if the index for <var>value</var>, calculated according to
-     *                                    this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition
+     *                                    this {@code TabularData} instance's {@code TabularType} definition
      *                                    already maps to an existing value in the underlying HashMap.
      */
     public void put(CompositeData value) ;
 
     /**
-     * Removes the <tt>CompositeData</tt> value whose index is <var>key</var> from this <tt>TabularData</tt> instance,
-     * and returns the removed value, or returns <tt>null</tt> if there is no value whose index is <var>key</var>.
+     * Removes the {@code CompositeData} value whose index is <var>key</var> from this {@code TabularData} instance,
+     * and returns the removed value, or returns {@code null} if there is no value whose index is <var>key</var>.
      *
-     * @param  key  the index of the value to get in this <tt>TabularData</tt> instance;
-     *              must be valid with this <tt>TabularData</tt> instance's row type definition;
+     * @param  key  the index of the value to get in this {@code TabularData} instance;
+     *              must be valid with this {@code TabularData} instance's row type definition;
      *              must not be null.
      *
-     * @return previous value associated with specified key, or <tt>null</tt>
+     * @return previous value associated with specified key, or {@code null}
      *         if there was no mapping for key.
      *
-     * @throws NullPointerException  if the <var>key</var> is <tt>null</tt>
-     * @throws InvalidKeyException   if the <var>key</var> does not conform to this <tt>TabularData</tt> instance's
-     *                               <tt>TabularType</tt> definition
+     * @throws NullPointerException  if the <var>key</var> is {@code null}
+     * @throws InvalidKeyException   if the <var>key</var> does not conform to this {@code TabularData} instance's
+     *                               {@code TabularType} definition
      */
     public CompositeData remove(Object[] key) ;
 
@@ -195,27 +195,27 @@
 
 
     /**
-     * Add all the elements in <var>values</var> to this <tt>TabularData</tt> instance.
-     * If any  element in <var>values</var> does not satisfy the constraints defined in {@link #put(CompositeData) <tt>put</tt>},
-     * or if any two elements in <var>values</var> have the same index calculated according to this <tt>TabularData</tt>
-     * instance's <tt>TabularType</tt> definition, then an exception describing the failure is thrown
-     * and no element of <var>values</var> is added,  thus leaving this <tt>TabularData</tt> instance unchanged.
+     * Add all the elements in <var>values</var> to this {@code TabularData} instance.
+     * If any  element in <var>values</var> does not satisfy the constraints defined in {@link #put(CompositeData) put},
+     * or if any two elements in <var>values</var> have the same index calculated according to this {@code TabularData}
+     * instance's {@code TabularType} definition, then an exception describing the failure is thrown
+     * and no element of <var>values</var> is added,  thus leaving this {@code TabularData} instance unchanged.
      *
-     * @param  values  the array of composite data values to be added as new rows to this <tt>TabularData</tt> instance;
-     *                 if <var>values</var> is <tt>null</tt> or empty, this method returns without doing anything.
+     * @param  values  the array of composite data values to be added as new rows to this {@code TabularData} instance;
+     *                 if <var>values</var> is {@code null} or empty, this method returns without doing anything.
      *
-     * @throws NullPointerException       if an element of <var>values</var> is <tt>null</tt>
+     * @throws NullPointerException       if an element of <var>values</var> is {@code null}
      * @throws InvalidOpenTypeException   if an element of <var>values</var> does not conform to
-     *                                    this <tt>TabularData</tt> instance's row type definition
+     *                                    this {@code TabularData} instance's row type definition
      * @throws KeyAlreadyExistsException  if the index for an element of <var>values</var>, calculated according to
-     *                                    this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition
+     *                                    this {@code TabularData} instance's {@code TabularType} definition
      *                                    already maps to an existing value in this instance,
      *                                    or two elements of <var>values</var> have the same index.
      */
     public void putAll(CompositeData[] values) ;
 
     /**
-     * Removes all <tt>CompositeData</tt> values (ie rows) from this <tt>TabularData</tt> instance.
+     * Removes all {@code CompositeData} values (ie rows) from this {@code TabularData} instance.
      */
     public void clear();
 
@@ -257,47 +257,47 @@
 
 
     /**
-     * Compares the specified <var>obj</var> parameter with this <code>TabularData</code> instance for equality.
+     * Compares the specified <var>obj</var> parameter with this {@code TabularData} instance for equality.
      * <p>
-     * Returns <tt>true</tt> if and only if all of the following statements are true:
+     * Returns {@code true} if and only if all of the following statements are true:
      * <ul>
      * <li><var>obj</var> is non null,</li>
-     * <li><var>obj</var> also implements the <code>TabularData</code> interface,</li>
+     * <li><var>obj</var> also implements the {@code TabularData} interface,</li>
      * <li>their row types are equal</li>
      * <li>their contents (ie index to value mappings) are equal</li>
      * </ul>
-     * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
-     * different implementations of the <code>TabularData</code> interface.
+     * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are
+     * different implementations of the {@code TabularData} interface.
      * <br>&nbsp;
-     * @param  obj  the object to be compared for equality with this <code>TabularData</code> instance;
+     * @param  obj  the object to be compared for equality with this {@code TabularData} instance;
      *
-     * @return  <code>true</code> if the specified object is equal to this <code>TabularData</code> instance.
+     * @return  {@code true} if the specified object is equal to this {@code TabularData} instance.
      */
     public boolean equals(Object obj);
 
     /**
-     * Returns the hash code value for this <code>TabularData</code> instance.
+     * Returns the hash code value for this {@code TabularData} instance.
      * <p>
-     * The hash code of a <code>TabularData</code> instance is the sum of the hash codes
-     * of all elements of information used in <code>equals</code> comparisons
+     * The hash code of a {@code TabularData} instance is the sum of the hash codes
+     * of all elements of information used in {@code equals} comparisons
      * (ie: its <i>tabular type</i> and its content, where the content is defined as all the index to value mappings).
      * <p>
-     * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
-     * for any two <code>TabularDataSupport</code> instances <code>t1</code> and <code>t2</code>,
+     * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+     * for any two {@code TabularDataSupport} instances {@code t1} and {@code t2},
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
      *
-     * @return  the hash code value for this <code>TabularDataSupport</code> instance
+     * @return  the hash code value for this {@code TabularDataSupport} instance
      */
     public int hashCode();
 
     /**
-     * Returns a string representation of this <code>TabularData</code> instance.
+     * Returns a string representation of this {@code TabularData} instance.
      * <p>
      * The string representation consists of the name of the implementing class,
      * and the tabular type of this instance.
      *
-     * @return  a string representation of this <code>TabularData</code> instance
+     * @return  a string representation of this {@code TabularData} instance
      */
     public String toString();
 
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/TabularDataSupport.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/TabularDataSupport.java	Mon Aug 10 14:05:37 2015 +0300
@@ -51,8 +51,9 @@
 
 
 /**
- * The <tt>TabularDataSupport</tt> class is the <i>open data</i> class which implements the <tt>TabularData</tt>
- * and the <tt>Map</tt> interfaces, and which is internally based on a hash map data structure.
+ * The {@code TabularDataSupport} class is the <i>open data</i>
+ * class which implements the {@code TabularData}
+ * and the {@code Map} interfaces, and which is internally based on a hash map data structure.
  *
  * @since 1.5
  */
@@ -102,13 +103,15 @@
 
 
     /**
-     * Creates an empty <tt>TabularDataSupport</tt> instance whose open-type is <var>tabularType</var>,
-     * and whose underlying <tt>HashMap</tt> has a default initial capacity (101) and default load factor (0.75).
+     * Creates an empty {@code TabularDataSupport} instance
+     * whose open-type is <var>tabularType</var>,
+     * and whose underlying {@code HashMap} has a default
+     * initial capacity (101) and default load factor (0.75).
      * <p>
-     * This constructor simply calls <tt>this(tabularType, 101, 0.75f);</tt>
+     * This constructor simply calls {@code this(tabularType, 101, 0.75f);}
      *
-     * @param  tabularType               the <i>tabular type</i> describing this <tt>TabularData</tt> instance;
-     *                                   cannot be null.
+     * @param  tabularType the <i>tabular type</i> describing this
+     *         {@code TabularData} instance; cannot be null.
      *
      * @throws IllegalArgumentException  if the tabular type is null.
      */
@@ -118,10 +121,10 @@
     }
 
     /**
-     * Creates an empty <tt>TabularDataSupport</tt> instance whose open-type is <var>tabularType</var>,
-     * and whose underlying <tt>HashMap</tt> has the specified initial capacity and load factor.
+     * Creates an empty {@code TabularDataSupport} instance whose open-type is <var>tabularType</var>,
+     * and whose underlying {@code HashMap} has the specified initial capacity and load factor.
      *
-     * @param  tabularType               the <i>tabular type</i> describing this <tt>TabularData</tt> instance;
+     * @param  tabularType               the <i>tabular type</i> describing this {@code TabularData} instance;
      *                           cannot be null.
      *
      * @param  initialCapacity   the initial capacity of the HashMap.
@@ -167,7 +170,7 @@
 
 
     /**
-     * Returns the <i>tabular type</i> describing this <tt>TabularData</tt> instance.
+     * Returns the <i>tabular type</i> describing this {@code TabularData} instance.
      */
     public TabularType getTabularType() {
 
@@ -175,21 +178,22 @@
     }
 
     /**
-     * Calculates the index that would be used in this <tt>TabularData</tt> instance to refer to the specified
-     * composite data <var>value</var> parameter if it were added to this instance.
+     * Calculates the index that would be used in this {@code TabularData} instance to refer
+     * to the specified composite data <var>value</var> parameter if it were added to this instance.
      * This method checks for the type validity of the specified <var>value</var>,
-     * but does not check if the calculated index is already used to refer to a value in this <tt>TabularData</tt> instance.
+     * but does not check if the calculated index is already used
+     * to refer to a value in this {@code TabularData} instance.
      *
      * @param  value                      the composite data value whose index in this
-     *                                    <tt>TabularData</tt> instance is to be calculated;
+     *                                    {@code TabularData} instance is to be calculated;
      *                                    must be of the same composite type as this instance's row type;
      *                                    must not be null.
      *
-     * @return the index that the specified <var>value</var> would have in this <tt>TabularData</tt> instance.
+     * @return the index that the specified <var>value</var> would have in this {@code TabularData} instance.
      *
-     * @throws NullPointerException       if <var>value</var> is <tt>null</tt>.
+     * @throws NullPointerException       if <var>value</var> is {@code null}.
      *
-     * @throws InvalidOpenTypeException   if <var>value</var> does not conform to this <tt>TabularData</tt> instance's
+     * @throws InvalidOpenTypeException   if <var>value</var> does not conform to this {@code TabularData} instance's
      *                                    row type definition.
      */
     public Object[] calculateIndex(CompositeData value) {
@@ -210,14 +214,14 @@
 
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains a <tt>CompositeData</tt> value
+     * Returns {@code true} if and only if this {@code TabularData} instance contains a {@code CompositeData} value
      * (ie a row) whose index is the specified <var>key</var>. If <var>key</var> cannot be cast to a one dimension array
-     * of Object instances, this method simply returns <tt>false</tt>; otherwise it returns the result of the call to
-     * <tt>this.containsKey((Object[]) key)</tt>.
+     * of Object instances, this method simply returns {@code false}; otherwise it returns the result of the call to
+     * {@code this.containsKey((Object[]) key)}.
      *
-     * @param  key  the index value whose presence in this <tt>TabularData</tt> instance is to be tested.
+     * @param  key  the index value whose presence in this {@code TabularData} instance is to be tested.
      *
-     * @return  <tt>true</tt> if this <tt>TabularData</tt> indexes a row value with the specified key.
+     * @return  {@code true} if this {@code TabularData} indexes a row value with the specified key.
      */
     public boolean containsKey(Object key) {
 
@@ -234,13 +238,13 @@
     }
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains a <tt>CompositeData</tt> value
-     * (ie a row) whose index is the specified <var>key</var>. If <var>key</var> is <tt>null</tt> or does not conform to
-     * this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition, this method simply returns <tt>false</tt>.
+     * Returns {@code true} if and only if this {@code TabularData} instance contains a {@code CompositeData} value
+     * (ie a row) whose index is the specified <var>key</var>. If <var>key</var> is {@code null} or does not conform to
+     * this {@code TabularData} instance's {@code TabularType} definition, this method simply returns {@code false}.
      *
-     * @param  key  the index value whose presence in this <tt>TabularData</tt> instance is to be tested.
+     * @param  key  the index value whose presence in this {@code TabularData} instance is to be tested.
      *
-     * @return  <tt>true</tt> if this <tt>TabularData</tt> indexes a row value with the specified key.
+     * @return  {@code true} if this {@code TabularData} indexes a row value with the specified key.
      */
     public boolean containsKey(Object[] key) {
 
@@ -248,13 +252,13 @@
     }
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains the specified
-     * <tt>CompositeData</tt> value. If <var>value</var> is <tt>null</tt> or does not conform to
-     * this <tt>TabularData</tt> instance's row type definition, this method simply returns <tt>false</tt>.
+     * Returns {@code true} if and only if this {@code TabularData} instance contains the specified
+     * {@code CompositeData} value. If <var>value</var> is {@code null} or does not conform to
+     * this {@code TabularData} instance's row type definition, this method simply returns {@code false}.
      *
-     * @param  value  the row value whose presence in this <tt>TabularData</tt> instance is to be tested.
+     * @param  value  the row value whose presence in this {@code TabularData} instance is to be tested.
      *
-     * @return  <tt>true</tt> if this <tt>TabularData</tt> instance contains the specified row value.
+     * @return  {@code true} if this {@code TabularData} instance contains the specified row value.
      */
     public boolean containsValue(CompositeData value) {
 
@@ -262,12 +266,12 @@
     }
 
     /**
-     * Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains the specified
+     * Returns {@code true} if and only if this {@code TabularData} instance contains the specified
      * value.
      *
-     * @param  value  the row value whose presence in this <tt>TabularData</tt> instance is to be tested.
+     * @param  value  the row value whose presence in this {@code TabularData} instance is to be tested.
      *
-     * @return  <tt>true</tt> if this <tt>TabularData</tt> instance contains the specified row value.
+     * @return  {@code true} if this {@code TabularData} instance contains the specified row value.
      */
     public boolean containsValue(Object value) {
 
@@ -275,12 +279,13 @@
     }
 
     /**
-     * This method simply calls <tt>get((Object[]) key)</tt>.
+     * This method simply calls {@code get((Object[]) key)}.
      *
-     * @throws NullPointerException  if the <var>key</var> is <tt>null</tt>
-     * @throws ClassCastException    if the <var>key</var> is not of the type <tt>Object[]</tt>
-     * @throws InvalidKeyException   if the <var>key</var> does not conform to this <tt>TabularData</tt> instance's
-     *                               <tt>TabularType</tt> definition
+     * @throws NullPointerException  if the <var>key</var> is {@code null}
+     * @throws ClassCastException    if the <var>key</var> is not of the type {@code Object[]}
+     * @throws InvalidKeyException   if the <var>key</var> does not conform
+     *                               to this {@code TabularData} instance's
+     *                               {@code TabularType} definition
      */
     public Object get(Object key) {
 
@@ -288,20 +293,21 @@
     }
 
     /**
-     * Returns the <tt>CompositeData</tt> value whose index is
-     * <var>key</var>, or <tt>null</tt> if there is no value mapping
-     * to <var>key</var>, in this <tt>TabularData</tt> instance.
+     * Returns the {@code CompositeData} value whose index is
+     * <var>key</var>, or {@code null} if there is no value mapping
+     * to <var>key</var>, in this {@code TabularData} instance.
      *
      * @param key the index of the value to get in this
-     * <tt>TabularData</tt> instance; * must be valid with this
-     * <tt>TabularData</tt> instance's row type definition; * must not
+     * {@code TabularData} instance; must be valid with this
+     * {@code TabularData} instance's row type definition; must not
      * be null.
      *
      * @return the value corresponding to <var>key</var>.
      *
-     * @throws NullPointerException  if the <var>key</var> is <tt>null</tt>
-     * @throws InvalidKeyException   if the <var>key</var> does not conform to this <tt>TabularData</tt> instance's
-     *                               <tt>TabularType</tt> type definition.
+     * @throws NullPointerException  if the <var>key</var> is {@code null}
+     * @throws InvalidKeyException   if the <var>key</var> does not conform
+     *                               to this {@code TabularData} instance's
+     *                               {@code TabularType} type definition.
      */
     public CompositeData get(Object[] key) {
 
@@ -322,23 +328,23 @@
 
 
     /**
-     * This method simply calls <tt>put((CompositeData) value)</tt> and
-     * therefore ignores its <var>key</var> parameter which can be <tt>null</tt>.
+     * This method simply calls {@code put((CompositeData) value)} and
+     * therefore ignores its <var>key</var> parameter which can be {@code null}.
      *
      * @param key an ignored parameter.
      * @param value the {@link CompositeData} to put.
      *
      * @return the value which is put
      *
-     * @throws NullPointerException  if the <var>value</var> is <tt>null</tt>
+     * @throws NullPointerException  if the <var>value</var> is {@code null}
      * @throws ClassCastException if the <var>value</var> is not of
-     * the type <tt>CompositeData</tt>
+     * the type {@code CompositeData}
      * @throws InvalidOpenTypeException if the <var>value</var> does
-     * not conform to this <tt>TabularData</tt> instance's
-     * <tt>TabularType</tt> definition
+     * not conform to this {@code TabularData} instance's
+     * {@code TabularType} definition
      * @throws KeyAlreadyExistsException if the key for the
      * <var>value</var> parameter, calculated according to this
-     * <tt>TabularData</tt> instance's <tt>TabularType</tt> definition
+     * {@code TabularData} instance's {@code TabularType} definition
      * already maps to an existing value
      */
     public Object put(Object key, Object value) {
@@ -363,17 +369,17 @@
     }
 
     /**
-     * This method simply calls <tt>remove((Object[]) key)</tt>.
+     * This method simply calls {@code remove((Object[]) key)}.
      *
-     * @param key an <tt>Object[]</tt> representing the key to remove.
+     * @param key an {@code Object[]} representing the key to remove.
      *
-     * @return previous value associated with specified key, or <tt>null</tt>
+     * @return previous value associated with specified key, or {@code null}
      *         if there was no mapping for key.
      *
-     * @throws NullPointerException  if the <var>key</var> is <tt>null</tt>
-     * @throws ClassCastException    if the <var>key</var> is not of the type <tt>Object[]</tt>
-     * @throws InvalidKeyException   if the <var>key</var> does not conform to this <tt>TabularData</tt> instance's
-     *                               <tt>TabularType</tt> definition
+     * @throws NullPointerException  if the <var>key</var> is {@code null}
+     * @throws ClassCastException    if the <var>key</var> is not of the type {@code Object[]}
+     * @throws InvalidKeyException   if the <var>key</var> does not conform to this {@code TabularData} instance's
+     *                               {@code TabularType} definition
      */
     public Object remove(Object key) {
 
@@ -381,19 +387,19 @@
     }
 
     /**
-     * Removes the <tt>CompositeData</tt> value whose index is <var>key</var> from this <tt>TabularData</tt> instance,
-     * and returns the removed value, or returns <tt>null</tt> if there is no value whose index is <var>key</var>.
+     * Removes the {@code CompositeData} value whose index is <var>key</var> from this {@code TabularData} instance,
+     * and returns the removed value, or returns {@code null} if there is no value whose index is <var>key</var>.
      *
-     * @param  key  the index of the value to get in this <tt>TabularData</tt> instance;
-     *              must be valid with this <tt>TabularData</tt> instance's row type definition;
+     * @param  key  the index of the value to get in this {@code TabularData} instance;
+     *              must be valid with this {@code TabularData} instance's row type definition;
      *              must not be null.
      *
-     * @return previous value associated with specified key, or <tt>null</tt>
+     * @return previous value associated with specified key, or {@code null}
      *         if there was no mapping for key.
      *
-     * @throws NullPointerException  if the <var>key</var> is <tt>null</tt>
-     * @throws InvalidKeyException   if the <var>key</var> does not conform to this <tt>TabularData</tt> instance's
-     *                               <tt>TabularType</tt> definition
+     * @throws NullPointerException  if the <var>key</var> is {@code null}
+     * @throws InvalidKeyException   if the <var>key</var> does not conform to this {@code TabularData} instance's
+     *                               {@code TabularType} definition
      */
     public CompositeData remove(Object[] key) {
 
@@ -414,30 +420,30 @@
 
     /**
      * Add all the values contained in the specified map <var>t</var>
-     * to this <tt>TabularData</tt> instance.  This method converts
+     * to this {@code TabularData} instance.  This method converts
      * the collection of values contained in this map into an array of
-     * <tt>CompositeData</tt> values, if possible, and then call the
-     * method <tt>putAll(CompositeData[])</tt>. Note that the keys
+     * {@code CompositeData} values, if possible, and then call the
+     * method {@code putAll(CompositeData[])}. Note that the keys
      * used in the specified map <var>t</var> are ignored. This method
      * allows, for example to add the content of another
-     * <tt>TabularData</tt> instance with the same row type (but
+     * {@code TabularData} instance with the same row type (but
      * possibly different index names) into this instance.
      *
      * @param t the map whose values are to be added as new rows to
-     * this <tt>TabularData</tt> instance; if <var>t</var> is
-     * <tt>null</tt> or empty, this method returns without doing
+     * this {@code TabularData} instance; if <var>t</var> is
+     * {@code null} or empty, this method returns without doing
      * anything.
      *
      * @throws NullPointerException if a value in <var>t</var> is
-     * <tt>null</tt>.
+     * {@code null}.
      * @throws ClassCastException if a value in <var>t</var> is not an
-     * instance of <tt>CompositeData</tt>.
+     * instance of {@code CompositeData}.
      * @throws InvalidOpenTypeException if a value in <var>t</var>
-     * does not conform to this <tt>TabularData</tt> instance's row
+     * does not conform to this {@code TabularData} instance's row
      * type definition.
      * @throws KeyAlreadyExistsException if the index for a value in
      * <var>t</var>, calculated according to this
-     * <tt>TabularData</tt> instance's <tt>TabularType</tt> definition
+     * {@code TabularData} instance's {@code TabularType} definition
      * already maps to an existing value in this instance, or two
      * values in <var>t</var> have the same index.
      */
@@ -449,14 +455,14 @@
             return;
         }
 
-        // Convert the values in t into an array of <tt>CompositeData</tt>
+        // Convert the values in t into an array of {@code CompositeData}
         //
         CompositeData[] values;
         try {
             values =
                 t.values().toArray(new CompositeData[t.size()]);
         } catch (java.lang.ArrayStoreException e) {
-            throw new ClassCastException("Map argument t contains values which are not instances of <tt>CompositeData</tt>");
+            throw new ClassCastException("Map argument t contains values which are not instances of {@code CompositeData}");
         }
 
         // Add the array of values
@@ -466,30 +472,30 @@
 
     /**
      * Add all the elements in <var>values</var> to this
-     * <tt>TabularData</tt> instance.  If any element in
+     * {@code TabularData} instance.  If any element in
      * <var>values</var> does not satisfy the constraints defined in
-     * {@link #put(CompositeData) <tt>put</tt>}, or if any two
+     * {@link #put(CompositeData) put}, or if any two
      * elements in <var>values</var> have the same index calculated
-     * according to this <tt>TabularData</tt> instance's
-     * <tt>TabularType</tt> definition, then an exception describing
+     * according to this {@code TabularData} instance's
+     * {@code TabularType} definition, then an exception describing
      * the failure is thrown and no element of <var>values</var> is
-     * added, thus leaving this <tt>TabularData</tt> instance
+     * added, thus leaving this {@code TabularData} instance
      * unchanged.
      *
      * @param values the array of composite data values to be added as
-     * new rows to this <tt>TabularData</tt> instance; if
-     * <var>values</var> is <tt>null</tt> or empty, this method
+     * new rows to this {@code TabularData} instance; if
+     * <var>values</var> is {@code null} or empty, this method
      * returns without doing anything.
      *
      * @throws NullPointerException if an element of <var>values</var>
-     * is <tt>null</tt>
+     * is {@code null}
      * @throws InvalidOpenTypeException if an element of
      * <var>values</var> does not conform to this
-     * <tt>TabularData</tt> instance's row type definition (ie its
-     * <tt>TabularType</tt> definition)
+     * {@code TabularData} instance's row type definition (ie its
+     * {@code TabularType} definition)
      * @throws KeyAlreadyExistsException if the index for an element
      * of <var>values</var>, calculated according to this
-     * <tt>TabularData</tt> instance's <tt>TabularType</tt> definition
+     * {@code TabularData} instance's {@code TabularType} definition
      * already maps to an existing value in this instance, or two
      * elements of <var>values</var> have the same index
      */
@@ -529,7 +535,7 @@
     }
 
     /**
-     * Removes all rows from this <code>TabularDataSupport</code> instance.
+     * Removes all rows from this {@code TabularDataSupport} instance.
      */
     public void clear() {
 
@@ -541,9 +547,9 @@
     /* ***  Informational methods from java.util.Map  *** */
 
     /**
-     * Returns the number of rows in this <code>TabularDataSupport</code> instance.
+     * Returns the number of rows in this {@code TabularDataSupport} instance.
      *
-     * @return the number of rows in this <code>TabularDataSupport</code> instance.
+     * @return the number of rows in this {@code TabularDataSupport} instance.
      */
     public int size() {
 
@@ -551,9 +557,9 @@
     }
 
     /**
-     * Returns <tt>true</tt> if this <code>TabularDataSupport</code> instance contains no rows.
+     * Returns {@code true} if this {@code TabularDataSupport} instance contains no rows.
      *
-     * @return <tt>true</tt> if this <code>TabularDataSupport</code> instance contains no rows.
+     * @return {@code true} if this {@code TabularDataSupport} instance contains no rows.
      */
     public boolean isEmpty() {
 
@@ -656,9 +662,10 @@
 
 
     /**
-     * Returns a clone of this <code>TabularDataSupport</code> instance:
-     * the clone is obtained by calling <tt>super.clone()</tt>, and then cloning the underlying map.
-     * Only a shallow clone of the underlying map is made, i.e. no cloning of the indexes and row values is made as they are immutable.
+     * Returns a clone of this {@code TabularDataSupport} instance:
+     * the clone is obtained by calling {@code super.clone()}, and then cloning the underlying map.
+     * Only a shallow clone of the underlying map is made, i.e.
+     * no cloning of the indexes and row values is made as they are immutable.
      */
     /* We cannot use covariance here and return TabularDataSupport
        because this would fail with existing code that subclassed
@@ -677,21 +684,21 @@
 
 
     /**
-     * Compares the specified <var>obj</var> parameter with this <code>TabularDataSupport</code> instance for equality.
+     * Compares the specified <var>obj</var> parameter with this {@code TabularDataSupport} instance for equality.
      * <p>
-     * Returns <tt>true</tt> if and only if all of the following statements are true:
+     * Returns {@code true} if and only if all of the following statements are true:
      * <ul>
      * <li><var>obj</var> is non null,</li>
-     * <li><var>obj</var> also implements the <code>TabularData</code> interface,</li>
+     * <li><var>obj</var> also implements the {@code TabularData} interface,</li>
      * <li>their tabular types are equal</li>
      * <li>their contents (ie all CompositeData values) are equal.</li>
      * </ul>
-     * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are
-     * different implementations of the <code>TabularData</code> interface.
+     * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are
+     * different implementations of the {@code TabularData} interface.
      * <br>&nbsp;
-     * @param  obj  the object to be compared for equality with this <code>TabularDataSupport</code> instance;
+     * @param  obj  the object to be compared for equality with this {@code TabularDataSupport} instance;
      *
-     * @return  <code>true</code> if the specified object is equal to this <code>TabularDataSupport</code> instance.
+     * @return  {@code true} if the specified object is equal to this {@code TabularDataSupport} instance.
      */
     public boolean equals(Object obj) {
 
@@ -738,22 +745,22 @@
     }
 
     /**
-     * Returns the hash code value for this <code>TabularDataSupport</code> instance.
+     * Returns the hash code value for this {@code TabularDataSupport} instance.
      * <p>
-     * The hash code of a <code>TabularDataSupport</code> instance is the sum of the hash codes
-     * of all elements of information used in <code>equals</code> comparisons
+     * The hash code of a {@code TabularDataSupport} instance is the sum of the hash codes
+     * of all elements of information used in {@code equals} comparisons
      * (ie: its <i>tabular type</i> and its content, where the content is defined as all the CompositeData values).
      * <p>
-     * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code>
-     * for any two <code>TabularDataSupport</code> instances <code>t1</code> and <code>t2</code>,
+     * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+     * for any two {@code TabularDataSupport} instances {@code t1} and {@code t2},
      * as required by the general contract of the method
      * {@link Object#hashCode() Object.hashCode()}.
      * <p>
-     * However, note that another instance of a class implementing the <code>TabularData</code> interface
-     * may be equal to this <code>TabularDataSupport</code> instance as defined by {@link #equals},
+     * However, note that another instance of a class implementing the {@code TabularData} interface
+     * may be equal to this {@code TabularDataSupport} instance as defined by {@link #equals},
      * but may have a different hash code if it is calculated differently.
      *
-     * @return  the hash code value for this <code>TabularDataSupport</code> instance
+     * @return  the hash code value for this {@code TabularDataSupport} instance
      */
    public int hashCode() {
 
@@ -768,14 +775,15 @@
     }
 
     /**
-     * Returns a string representation of this <code>TabularDataSupport</code> instance.
+     * Returns a string representation of this {@code TabularDataSupport} instance.
      * <p>
-     * The string representation consists of the name of this class (ie <code>javax.management.openmbean.TabularDataSupport</code>),
+     * The string representation consists of the name of this class
+     * (ie {@code javax.management.openmbean.TabularDataSupport}),
      * the string representation of the tabular type of this instance, and the string representation of the contents
      * (ie list the key=value mappings as returned by a call to
-     * <tt>dataMap.</tt>{@link java.util.HashMap#toString() toString()}).
+     * {@code dataMap.}{@link java.util.HashMap#toString() toString()}).
      *
-     * @return  a string representation of this <code>TabularDataSupport</code> instance
+     * @return  a string representation of this {@code TabularDataSupport} instance
      */
     public String toString() {
 
@@ -796,14 +804,17 @@
 
 
     /**
-     * Returns the index for value, assuming value is valid for this <tt>TabularData</tt> instance
+     * Returns the index for value, assuming value is valid for this {@code TabularData} instance
      * (ie value is not null, and its composite type is equal to row type).
      *
-     * The index is a List, and not an array, so that an index.equals(otherIndex) call will actually compare contents,
+     * The index is a List, and not an array, so that an
+     * index.equals(otherIndex) call will actually compare contents,
      * not just the objects references as is done for an array object.
      *
-     * The returned List is unmodifiable so that once a row has been put into the dataMap, its index cannot be modified,
-     * for example by a user that would attempt to modify an index contained in the Set returned by keySet().
+     * The returned List is unmodifiable so that once a row has been put
+     * into the dataMap, its index cannot be modified,
+     * for example by a user that would attempt to modify an
+     * index contained in the Set returned by keySet().
      */
     private List<?> internalCalculateIndex(CompositeData value) {
 
@@ -811,7 +822,7 @@
     }
 
     /**
-     * Checks if the specified key is valid for this <tt>TabularData</tt> instance.
+     * Checks if the specified key is valid for this {@code TabularData} instance.
      *
      * @throws  NullPointerException
      * @throws  InvalidOpenTypeException
@@ -848,7 +859,7 @@
     }
 
     /**
-     * Checks the specified value's type is valid for this <tt>TabularData</tt> instance
+     * Checks the specified value's type is valid for this {@code TabularData} instance
      * (ie value is not null, and its composite type is equal to row type).
      *
      * @throws  NullPointerException
@@ -872,7 +883,7 @@
     }
 
     /**
-     * Checks if the specified value can be put (ie added) in this <tt>TabularData</tt> instance
+     * Checks if the specified value can be put (ie added) in this {@code TabularData} instance
      * (ie value is not null, its composite type is equal to row type, and its index is not already used),
      * and returns the index calculated for this value.
      *
--- a/jdk/src/java.management/share/classes/javax/management/relation/RoleInfo.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/relation/RoleInfo.java	Mon Aug 10 14:05:37 2015 +0300
@@ -42,7 +42,7 @@
 /**
  * A RoleInfo object summarises a role in a relation type.
  *
- * <p>The <b>serialVersionUID</b> of this class is <code>2504952983494636987L</code>.
+ * <p>The <b>serialVersionUID</b> of this class is {@code 2504952983494636987L}.
  *
  * @since 1.5
  */
@@ -89,8 +89,8 @@
     private static final long serialVersionUID;
     /**
      * @serialField name String Role name
-     * @serialField isReadable boolean Read access mode: <code>true</code> if role is readable
-     * @serialField isWritable boolean Write access mode: <code>true</code> if role is writable
+     * @serialField isReadable boolean Read access mode: {@code true} if role is readable
+     * @serialField isWritable boolean Write access mode: {@code true} if role is writable
      * @serialField description String Role description
      * @serialField minDegree int Minimum degree (i.e. minimum number of referenced MBeans in corresponding role)
      * @serialField maxDegree int Maximum degree (i.e. maximum number of referenced MBeans in corresponding role)
@@ -136,12 +136,12 @@
     private String name = null;
 
     /**
-     * @serial Read access mode: <code>true</code> if role is readable
+     * @serial Read access mode: {@code true} if role is readable
      */
     private boolean isReadable;
 
     /**
-     * @serial Write access mode: <code>true</code> if role is writable
+     * @serial Write access mode: {@code true} if role is writable
      */
     private boolean isWritable;
 
@@ -183,11 +183,11 @@
      * can be set
      * @param min  minimum degree for role, i.e. minimum number of
      * MBeans to provide in corresponding role
-     * Must be less than or equal to <tt>max</tt>.
+     * Must be less than or equal to {@code max}.
      * (ROLE_CARDINALITY_INFINITY for unlimited)
      * @param max  maximum degree for role, i.e. maximum number of
      * MBeans to provide in corresponding role
-     * Must be greater than or equal to <tt>min</tt>
+     * Must be greater than or equal to {@code min}
      * (ROLE_CARDINALITY_INFINITY for unlimited)
      * @param descr  description of the role (can be null)
      *
@@ -316,7 +316,7 @@
     /**
      * Copy constructor.
      *
-     * @param roleInfo the <tt>RoleInfo</tt> instance to be copied.
+     * @param roleInfo the {@code RoleInfo} instance to be copied.
      *
      * @exception IllegalArgumentException  if null parameter
      */
@@ -413,7 +413,7 @@
     }
 
     /**
-     * Returns true if the <tt>value</tt> parameter is greater than or equal to
+     * Returns true if the {@code value} parameter is greater than or equal to
      * the expected minimum degree, false otherwise.
      *
      * @param value  the value to be checked
@@ -431,7 +431,7 @@
     }
 
     /**
-     * Returns true if the <tt>value</tt> parameter is lower than or equal to
+     * Returns true if the {@code value} parameter is lower than or equal to
      * the expected maximum degree, false otherwise.
      *
      * @param value  the value to be checked
--- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java	Mon Aug 10 14:05:37 2015 +0300
@@ -142,7 +142,7 @@
     }
 
     /**
-     * <p>Constructs an <code>RMIConnector</code> that will connect
+     * <p>Constructs an {@code RMIConnector} that will connect
      * the RMI connector server with the given address.</p>
      *
      * <p>The address can refer directly to the connector server,
@@ -153,7 +153,7 @@
      * service:jmx:iiop://<em>[host[:port]]</em>/ior/<em>encoded-IOR</em>
      * </pre>
      *
-     * <p>(Here, the square brackets <code>[]</code> are not part of the
+     * <p>(Here, the square brackets {@code []} are not part of the
      * address but indicate that the host and port are optional.)</p>
      *
      * <p>The address can instead indicate where to find an RMI stub
@@ -179,7 +179,7 @@
      * InitialContext#InitialContext(Hashtable) InitialContext}.  This
      * parameter can be null, which is equivalent to an empty Map.
      *
-     * @exception IllegalArgumentException if <code>url</code>
+     * @exception IllegalArgumentException if {@code url}
      * is null.
      */
     public RMIConnector(JMXServiceURL url, Map<String,?> environment) {
@@ -187,14 +187,14 @@
     }
 
     /**
-     * <p>Constructs an <code>RMIConnector</code> using the given RMI stub.
+     * <p>Constructs an {@code RMIConnector} using the given RMI stub.
      *
      * @param rmiServer an RMI stub representing the RMI connector server.
      * @param environment additional attributes specifying how to make
      * the connection.  This parameter can be null, which is
      * equivalent to an empty Map.
      *
-     * @exception IllegalArgumentException if <code>rmiServer</code>
+     * @exception IllegalArgumentException if {@code rmiServer}
      * is null.
      */
     public RMIConnector(RMIServer rmiServer, Map<String,?> environment) {
@@ -203,7 +203,7 @@
 
     /**
      * <p>Returns a string representation of this object.  In general,
-     * the <code>toString</code> method returns a string that
+     * the {@code toString} method returns a string that
      * "textually represents" this object. The result should be a
      * concise but informative representation that is easy for a
      * person to read.</p>
@@ -1732,7 +1732,7 @@
      * @param environment An environment map, possibly containing an ORB.
      * @return the given stub.
      * @exception IllegalArgumentException if the
-     *      <tt>java.naming.corba.orb</tt> property is specified and
+     *      {@code java.naming.corba.orb} property is specified and
      *      does not point to an {@link org.omg.CORBA.ORB ORB}.
      * @exception IOException if the connection to the ORB failed.
      **/
@@ -1767,7 +1767,7 @@
      * @param environment An environment map, possibly containing an ORB.
      * @return An ORB.
      * @exception IllegalArgumentException if the
-     *      <tt>java.naming.corba.orb</tt> property is specified and
+     *      {@code java.naming.corba.orb} property is specified and
      *      does not point to an {@link org.omg.CORBA.ORB ORB}.
      * @exception IOException if the ORB initialization failed.
      **/
@@ -1793,7 +1793,7 @@
     /**
      * Read RMIConnector fields from an {@link java.io.ObjectInputStream
      * ObjectInputStream}.
-     * Calls <code>s.defaultReadObject()</code> and then initializes
+     * Calls {@code s.defaultReadObject()} and then initializes
      * all transient variables that need initializing.
      * @param s The ObjectInputStream to read from.
      * @exception InvalidObjectException if none of <var>rmiServer</var> stub
@@ -1818,7 +1818,7 @@
      * before serializing it. This is done using the environment
      * map that was provided to the constructor, if any, and as documented
      * in {@link javax.management.remote.rmi}.</p>
-     * <p>This method then calls <code>s.defaultWriteObject()</code>.
+     * <p>This method then calls {@code s.defaultWriteObject()}.
      * Usually, <var>rmiServer</var> is null if this object
      * was constructed with a JMXServiceURL, and <var>jmxServiceURL</var>
      * is null if this object is constructed with a RMIServer stub.
@@ -1939,9 +1939,9 @@
      * Lookup the RMIServer stub in a directory.
      * @param jndiURL A JNDI URL indicating the location of the Stub
      *                (see {@link javax.management.remote.rmi}), e.g.:
-     *   <ul><li><tt>rmi://registry-host:port/rmi-stub-name</tt></li>
-     *       <li>or <tt>iiop://cosnaming-host:port/iiop-stub-name</tt></li>
-     *       <li>or <tt>ldap://ldap-host:port/java-container-dn</tt></li>
+     *   <ul><li>{@code rmi://registry-host:port/rmi-stub-name}</li>
+     *       <li>or {@code iiop://cosnaming-host:port/iiop-stub-name}</li>
+     *       <li>or {@code ldap://ldap-host:port/java-container-dn}</li>
      *   </ul>
      * @param env the environment Map passed to the connector.
      * @param isIiop true if the stub is expected to be an IIOP stub.
--- a/jdk/src/java.naming/share/classes/com/sun/naming/internal/ResourceManager.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/naming/internal/ResourceManager.java	Mon Aug 10 14:05:37 2015 +0300
@@ -137,7 +137,7 @@
      * context (never null).  This is based on the environment
      * parameter, the system properties, and all application resource files.
      *
-     * <p> This method will modify <tt>env</tt> and save
+     * <p> This method will modify {@code env} and save
      * a reference to it.  The caller may no longer modify it.
      *
      * @param env       environment passed to initial context constructor.
@@ -195,7 +195,7 @@
       * may in turn contain values that come from system properties,
       * or application resource files.
       *
-      * If <tt>concat</tt> is true and both the environment and the provider
+      * If {@code concat} is true and both the environment and the provider
       * resource file contain the property, the two values are concatenated
       * (with a ':' separator).
       *
--- a/jdk/src/java.naming/share/classes/javax/naming/Binding.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/Binding.java	Mon Aug 10 14:05:37 2015 +0300
@@ -49,7 +49,7 @@
     /**
      * Contains this binding's object.
      * It is initialized by the constructor and can be updated using
-     * <tt>setObject</tt>.
+     * {@code setObject}.
      * @serial
      * @see #getObject
      * @see #setObject
@@ -59,9 +59,9 @@
     /**
       * Constructs an instance of a Binding given its name and object.
       *<p>
-      * <tt>getClassName()</tt> will return
-      * the class name of <tt>obj</tt> (or null if <tt>obj</tt> is null)
-      * unless the class name has been explicitly set using <tt>setClassName()</tt>
+      * {@code getClassName()} will return
+      * the class name of {@code obj} (or null if {@code obj} is null)
+      * unless the class name has been explicitly set using {@code setClassName()}
       *
       * @param  name    The non-null name of the object. It is relative
       *             to the <em>target context</em> (which is
@@ -78,9 +78,9 @@
       * Constructs an instance of a Binding given its name, object, and whether
       * the name is relative.
       *<p>
-      * <tt>getClassName()</tt> will return the class name of <tt>obj</tt>
-      * (or null if <tt>obj</tt> is null) unless the class name has been
-      * explicitly set using <tt>setClassName()</tt>
+      * {@code getClassName()} will return the class name of {@code obj}
+      * (or null if {@code obj} is null) unless the class name has been
+      * explicitly set using {@code setClassName()}
       *
       * @param  name    The non-null string name of the object.
       * @param  obj     The possibly null object bound to name.
@@ -104,9 +104,9 @@
       *             to the <em>target context</em> (which is
       * named by the first parameter of the <code>listBindings()</code> method)
       * @param  className       The possibly null class name of the object
-      *         bound to <tt>name</tt>. If null, the class name of <tt>obj</tt> is
-      *         returned by <tt>getClassName()</tt>. If <tt>obj</tt> is also
-      *         null, <tt>getClassName()</tt> will return null.
+      *         bound to {@code name}. If null, the class name of {@code obj} is
+      *         returned by {@code getClassName()}. If {@code obj} is also
+      *         null, {@code getClassName()} will return null.
       * @param  obj     The possibly null object bound to name.
       * @see NameClassPair#setClassName
       */
@@ -121,9 +121,9 @@
       *
       * @param  name    The non-null string name of the object.
       * @param  className       The possibly null class name of the object
-      *         bound to <tt>name</tt>. If null, the class name of <tt>obj</tt> is
-      *         returned by <tt>getClassName()</tt>. If <tt>obj</tt> is also
-      *         null, <tt>getClassName()</tt> will return null.
+      *         bound to {@code name}. If null, the class name of {@code obj} is
+      *         returned by {@code getClassName()}. If {@code obj} is also
+      *         null, {@code getClassName()} will return null.
       * @param  obj     The possibly null object bound to name.
       * @param isRelative true if <code>name</code> is a name relative
       *         to the target context (which is named by
--- a/jdk/src/java.naming/share/classes/javax/naming/CannotProceedException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/CannotProceedException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -93,9 +93,9 @@
 
     /**
      * Contains the name of the resolved object, relative
-     * to the context <code>altNameCtx</code>.  It is a composite name.
+     * to the context {@code altNameCtx}.  It is a composite name.
      * If null, then no name is specified.
-     * See the <code>javax.naming.spi.ObjectFactory.getObjectInstance</code>
+     * See the {@code javax.naming.spi.ObjectFactory.getObjectInstance}
      * method for details on how this is used.
      * <p>
      * This field is initialized to null.
@@ -112,9 +112,9 @@
 
     /**
      * Contains the context relative to which
-     * <code>altName</code> is specified.  If null, then the default initial
+     * {@code altName} is specified.  If null, then the default initial
      * context is implied.
-     * See the <code>javax.naming.spi.ObjectFactory.getObjectInstance</code>
+     * See the {@code javax.naming.spi.ObjectFactory.getObjectInstance}
      * method for details on how this is used.
      * <p>
      * This field is initialized to null.
@@ -189,16 +189,16 @@
 
     /**
      * Sets the "remaining new name" field of this exception.
-     * This is the value returned by <code>getRemainingNewName()</code>.
+     * This is the value returned by {@code getRemainingNewName()}.
      *<p>
-     * <tt>newName</tt> is a composite name. If the intent is to set
+     * {@code newName} is a composite name. If the intent is to set
      * this field using a compound name or string, you must
      * "stringify" the compound name, and create a composite
      * name with a single component using the string. You can then
      * invoke this method using the resulting composite name.
      *<p>
-     * A copy of <code>newName</code> is made and stored.
-     * Subsequent changes to <code>name</code> does not
+     * A copy of {@code newName} is made and stored.
+     * Subsequent changes to {@code name} does not
      * affect the copy in this NamingException and vice versa.
      *
      * @param newName The possibly null name to set the "remaining new name" to.
@@ -214,13 +214,13 @@
     }
 
     /**
-     * Retrieves the <code>altName</code> field of this exception.
+     * Retrieves the {@code altName} field of this exception.
      * This is the name of the resolved object, relative to the context
-     * <code>altNameCtx</code>. It will be used during a subsequent call to the
-     * <code>javax.naming.spi.ObjectFactory.getObjectInstance</code> method.
+     * {@code altNameCtx}. It will be used during a subsequent call to the
+     * {@code javax.naming.spi.ObjectFactory.getObjectInstance} method.
      *
      * @return The name of the resolved object, relative to
-     *          <code>altNameCtx</code>.
+     *          {@code altNameCtx}.
      *          It is a composite name.  If null, then no name is specified.
      *
      * @see #setAltName
@@ -232,10 +232,10 @@
     }
 
     /**
-     * Sets the <code>altName</code> field of this exception.
+     * Sets the {@code altName} field of this exception.
      *
      * @param altName   The name of the resolved object, relative to
-     *                  <code>altNameCtx</code>.
+     *                  {@code altNameCtx}.
      *                  It is a composite name.
      *                  If null, then no name is specified.
      *
@@ -247,12 +247,12 @@
     }
 
     /**
-     * Retrieves the <code>altNameCtx</code> field of this exception.
-     * This is the context relative to which <code>altName</code> is named.
+     * Retrieves the {@code altNameCtx} field of this exception.
+     * This is the context relative to which {@code altName} is named.
      * It will be used during a subsequent call to the
-     * <code>javax.naming.spi.ObjectFactory.getObjectInstance</code> method.
+     * {@code javax.naming.spi.ObjectFactory.getObjectInstance} method.
      *
-     * @return  The context relative to which <code>altName</code> is named.
+     * @return  The context relative to which {@code altName} is named.
      *          If null, then the default initial context is implied.
      *
      * @see #setAltNameCtx
@@ -264,10 +264,10 @@
     }
 
     /**
-     * Sets the <code>altNameCtx</code> field of this exception.
+     * Sets the {@code altNameCtx} field of this exception.
      *
      * @param altNameCtx
-     *                  The context relative to which <code>altName</code>
+     *                  The context relative to which {@code altName}
      *                  is named.  If null, then the default initial context
      *                  is implied.
      *
--- a/jdk/src/java.naming/share/classes/javax/naming/CompositeName.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/CompositeName.java	Mon Aug 10 14:05:37 2015 +0300
@@ -76,7 +76,7 @@
  *<h1>Composite Name Examples</h1>
  *This table shows examples of some composite names. Each row shows
  *the string form of a composite name and its corresponding structural form
- *(<tt>CompositeName</tt>).
+ *({@code CompositeName}).
  *
 <table border="1" cellpadding=3 summary="examples showing string form of composite name and its corresponding structural form (CompositeName)">
 
@@ -140,7 +140,7 @@
  *<h1>Composition Examples</h1>
  * Here are some composition examples.  The right column shows composing
  * string composite names while the left column shows composing the
- * corresponding <tt>CompositeName</tt>s.  Notice that composing the
+ * corresponding {@code CompositeName}s.  Notice that composing the
  * string forms of two composite names simply involves concatenating
  * their string forms together.
 
@@ -190,9 +190,9 @@
 </table>
  *
  *<h1>Multithreaded Access</h1>
- * A <tt>CompositeName</tt> instance is not synchronized against concurrent
+ * A {@code CompositeName} instance is not synchronized against concurrent
  * multithreaded access. Multiple threads trying to access and modify a
- * <tt>CompositeName</tt> should lock the object.
+ * {@code CompositeName} should lock the object.
  *
  * @author Rosanna Lee
  * @author Scott Seligman
@@ -557,8 +557,8 @@
 
     /**
      * Overridden to avoid implementation dependency.
-     * @serialData The number of components (an <tt>int</tt>) followed by
-     * the individual components (each a <tt>String</tt>).
+     * @serialData The number of components (an {@code int}) followed by
+     * the individual components (each a {@code String}).
      */
     private void writeObject(java.io.ObjectOutputStream s)
             throws java.io.IOException {
--- a/jdk/src/java.naming/share/classes/javax/naming/CompoundName.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/CompoundName.java	Mon Aug 10 14:05:37 2015 +0300
@@ -137,9 +137,9 @@
  * of the original compound name.
  *
  *<h1>Multithreaded Access</h1>
- * A <tt>CompoundName</tt> instance is not synchronized against concurrent
+ * A {@code CompoundName} instance is not synchronized against concurrent
  * multithreaded access. Multiple threads trying to access and modify a
- * <tt>CompoundName</tt> should lock the object.
+ * {@code CompoundName} should lock the object.
  *
  * @author Rosanna Lee
  * @author Scott Seligman
@@ -194,7 +194,7 @@
       *                 this compound name.  See class description for
       *                 contents of properties.
       * @exception      InvalidNameException If 'n' violates the syntax specified
-      *                 by <code>syntax</code>.
+      *                 by {@code syntax}.
       */
     public CompoundName(String n, Properties syntax) throws InvalidNameException {
         if (syntax == null) {
@@ -549,9 +549,9 @@
 
     /**
      * Overridden to avoid implementation dependency.
-     * @serialData The syntax <tt>Properties</tt>, followed by
-     * the number of components (an <tt>int</tt>), and the individual
-     * components (each a <tt>String</tt>).
+     * @serialData The syntax {@code Properties}, followed by
+     * the number of components (an {@code int}), and the individual
+     * components (each a {@code String}).
      */
     private void writeObject(java.io.ObjectOutputStream s)
             throws java.io.IOException {
--- a/jdk/src/java.naming/share/classes/javax/naming/Context.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/Context.java	Mon Aug 10 14:05:37 2015 +0300
@@ -33,7 +33,7 @@
  * It contains methods for examining and updating these bindings.
  *
  * <h1>Names</h1>
- * Each name passed as an argument to a <tt>Context</tt> method is relative
+ * Each name passed as an argument to a {@code Context} method is relative
  * to that context.  The empty name is used to name the context itself.
  * A name parameter may never be null.
  * <p>
@@ -47,31 +47,31 @@
  * The second version instead has a link to the first:  the same
  * documentation applies to both.
  * <p>
- * For systems that support federation, <tt>String</tt> name arguments to
- * <tt>Context</tt> methods are composite names. Name arguments that are
- * instances of <tt>CompositeName</tt> are treated as composite names,
- * while <tt>Name</tt> arguments that are not instances of
- * <tt>CompositeName</tt> are treated as compound names (which might be
- * instances of <tt>CompoundName</tt> or other implementations of compound
- * names). This allows the results of <tt>NameParser.parse()</tt> to be used as
- * arguments to the <tt>Context</tt> methods.
+ * For systems that support federation, {@code String} name arguments to
+ * {@code Context} methods are composite names. Name arguments that are
+ * instances of {@code CompositeName} are treated as composite names,
+ * while {@code Name} arguments that are not instances of
+ * {@code CompositeName} are treated as compound names (which might be
+ * instances of {@code CompoundName} or other implementations of compound
+ * names). This allows the results of {@code NameParser.parse()} to be used as
+ * arguments to the {@code Context} methods.
  * Prior to JNDI 1.2, all name arguments were treated as composite names.
  *<p>
  * Furthermore, for systems that support federation, all names returned
- * in a <tt>NamingEnumeration</tt>
- * from <tt>list()</tt> and <tt>listBindings()</tt> are composite names
+ * in a {@code NamingEnumeration}
+ * from {@code list()} and {@code listBindings()} are composite names
  * represented as strings.
- * See <tt>CompositeName</tt> for the string syntax of names.
+ * See {@code CompositeName} for the string syntax of names.
  *<p>
  * For systems that do not support federation, the name arguments (in
- * either <tt>Name</tt> or <tt>String</tt> forms) and the names returned in
- * <tt>NamingEnumeration</tt> may be names in their own namespace rather than
+ * either {@code Name} or {@code String} forms) and the names returned in
+ * {@code NamingEnumeration} may be names in their own namespace rather than
  * names in a composite namespace, at the discretion of the service
  * provider.
  *
  *<h1>Exceptions</h1>
- * All the methods in this interface can throw a <tt>NamingException</tt> or
- * any of its subclasses. See <tt>NamingException</tt> and their subclasses
+ * All the methods in this interface can throw a {@code NamingException} or
+ * any of its subclasses. See {@code NamingException} and their subclasses
  * for details on each exception.
  *
  *<h1>Concurrent Access</h1>
@@ -80,26 +80,26 @@
  * a single Context instance concurrently should synchronize amongst
  * themselves and provide the necessary locking.  Multiple threads
  * each manipulating a different Context instance need not
- * synchronize.  Note that the {@link #lookup(Name) <tt>lookup</tt>}
+ * synchronize.  Note that the {@link #lookup(Name) lookup}
  * method, when passed an empty name, will return a new Context instance
  * representing the same naming context.
  *<p>
  * For purposes of concurrency control,
- * a Context operation that returns a <tt>NamingEnumeration</tt> is
+ * a Context operation that returns a {@code NamingEnumeration} is
  * not considered to have completed while the enumeration is still in
  * use, or while any referrals generated by that operation are still
  * being followed.
  *
  *
  *<h1>Parameters</h1>
- * A <tt>Name</tt> parameter passed to any method of the
- * <tt>Context</tt> interface or one of its subinterfaces
+ * A {@code Name} parameter passed to any method of the
+ * {@code Context} interface or one of its subinterfaces
  * will not be modified by the service provider.
  * The service provider may keep a reference to it
  * for the duration of the operation, including any enumeration of the
  * method's results and the processing of any referrals generated.
  * The caller should not modify the object during this time.
- * A <tt>Name</tt> returned by any such method is owned by the caller.
+ * A {@code Name} returned by any such method is owned by the caller.
  * The caller may subsequently modify it; the service provider may not.
  *
  *
@@ -111,7 +111,7 @@
  * require specification of security credentials in order to access
  * the service. Another context might require that server configuration
  * information be supplied. These are referred to as the <em>environment</em>
- * of a context. The <tt>Context</tt> interface provides methods for
+ * of a context. The {@code Context} interface provides methods for
  * retrieving and updating this environment.
  *<p>
  * The environment is inherited from the parent context as
@@ -145,7 +145,7 @@
  * application components and service providers may be distributed
  * along with <em>resource files.</em>
  * A JNDI resource file is a file in the properties file format (see
- * {@link java.util.Properties#load <tt>java.util.Properties</tt>}),
+ * {@link java.util.Properties#load java.util.Properties}),
  * containing a list of key/value pairs.
  * The key is the name of the property (e.g. "java.naming.factory.object")
  * and the value is a string in the format defined
@@ -170,18 +170,18 @@
  * Each service provider has an optional resource that lists properties
  * specific to that provider.  The name of this resource is:
  * <blockquote>
- * [<em>prefix</em>/]<tt>jndiprovider.properties</tt>
+ * [<em>prefix</em>/]{@code jndiprovider.properties}
  * </blockquote>
  * where <em>prefix</em> is
  * the package name of the provider's context implementation(s),
  * with each period (".") converted to a slash ("/").
  *
  * For example, suppose a service provider defines a context
- * implementation with class name <tt>com.sun.jndi.ldap.LdapCtx</tt>.
+ * implementation with class name {@code com.sun.jndi.ldap.LdapCtx}.
  * The provider resource for this provider is named
- * <tt>com/sun/jndi/ldap/jndiprovider.properties</tt>.  If the class is
+ * {@code com/sun/jndi/ldap/jndiprovider.properties}.  If the class is
  * not in a package, the resource's name is simply
- * <tt>jndiprovider.properties</tt>.
+ * {@code jndiprovider.properties}.
  *
  * <p>
  * <a name=LISTPROPS></a>
@@ -204,11 +204,11 @@
  *
  * When an application is deployed, it will generally have several
  * codebase directories and JARs in its classpath. JNDI locates (using
- * {@link ClassLoader#getResources <tt>ClassLoader.getResources()</tt>})
- * all <em>application resource files</em> named <tt>jndi.properties</tt>
+ * {@link ClassLoader#getResources ClassLoader.getResources()})
+ * all <em>application resource files</em> named {@code jndi.properties}
  * in the classpath.
  * In addition, if the Java installation directory contains a built-in
- * properties file, typically <tt>conf/jndi.properties</tt>,
+ * properties file, typically {@code conf/jndi.properties},
  * JNDI treats it as an additional application resource file.
  * All of the properties contained in these files are placed
  * into the environment of the initial context.  This environment
@@ -220,7 +220,7 @@
  * sense to do so, it concatenates all of the values (details are given
  * below).
  * For example, if the "java.naming.factory.object" property is found in
- * three <tt>jndi.properties</tt> resource files, the
+ * three {@code jndi.properties} resource files, the
  * list of object factories is a concatenation of the property
  * values from all three files.
  * Using this scheme, each deployable component is responsible for
@@ -234,7 +234,7 @@
  * is initialized with properties defined in the environment parameter
  * passed to the constructor, the system properties,
  * and the application resource files.  See
- * <a href=InitialContext.html#ENVIRONMENT><tt>InitialContext</tt></a>
+ * <a href=InitialContext.html#ENVIRONMENT>{@code InitialContext}</a>
  * for details.
  * This initial environment is then inherited by other context instances.
  *
@@ -244,7 +244,7 @@
  * the values from the following two sources, in order:
  * <ol>
  * <li>The environment of the context being operated on.
- * <li>The provider resource file (<tt>jndiprovider.properties</tt>)
+ * <li>The provider resource file ({@code jndiprovider.properties})
  * for the context being operated on.
  * </ol>
  * For each property found in both of these two sources,
@@ -278,14 +278,14 @@
 
     /**
      * Retrieves the named object.
-     * If <tt>name</tt> is empty, returns a new instance of this context
+     * If {@code name} is empty, returns a new instance of this context
      * (which represents the same naming context as this context, but its
      * environment may be modified independently and it may be accessed
      * concurrently).
      *
      * @param name
      *          the name of the object to look up
-     * @return  the object bound to <tt>name</tt>
+     * @return  the object bound to {@code name}
      * @throws  NamingException if a naming exception is encountered
      *
      * @see #lookup(String)
@@ -298,7 +298,7 @@
      * See {@link #lookup(Name)} for details.
      * @param name
      *          the name of the object to look up
-     * @return  the object bound to <tt>name</tt>
+     * @return  the object bound to {@code name}
      * @throws  NamingException if a naming exception is encountered
      */
     public Object lookup(String name) throws NamingException;
@@ -344,7 +344,7 @@
      * All intermediate contexts and the target context (that named by all
      * but terminal atomic component of the name) must already exist.
      *
-     * <p> If the object is a <tt>DirContext</tt>, any existing attributes
+     * <p> If the object is a {@code DirContext}, any existing attributes
      * associated with the name are replaced with those of the object.
      * Otherwise, any existing attributes associated with the name remain
      * unchanged.
@@ -388,7 +388,7 @@
      * <p> This method is idempotent.
      * It succeeds even if the terminal atomic name
      * is not bound in the target context, but throws
-     * <tt>NameNotFoundException</tt>
+     * {@code NameNotFoundException}
      * if any of the intermediate contexts do not exist.
      *
      * <p> Any attributes associated with the name are removed.
@@ -424,7 +424,7 @@
      *          the name of the existing binding; may not be empty
      * @param newName
      *          the name of the new binding; may not be empty
-     * @throws  NameAlreadyBoundException if <tt>newName</tt> is already bound
+     * @throws  NameAlreadyBoundException if {@code newName} is already bound
      * @throws  NamingException if a naming exception is encountered
      *
      * @see #rename(String, String)
@@ -442,7 +442,7 @@
      *          the name of the existing binding; may not be empty
      * @param newName
      *          the name of the new binding; may not be empty
-     * @throws  NameAlreadyBoundException if <tt>newName</tt> is already bound
+     * @throws  NameAlreadyBoundException if {@code newName} is already bound
      * @throws  NamingException if a naming exception is encountered
      */
     public void rename(String oldName, String newName) throws NamingException;
@@ -459,7 +459,7 @@
      *          the name of the context to list
      * @return  an enumeration of the names and class names of the
      *          bindings in this context.  Each element of the
-     *          enumeration is of type <tt>NameClassPair</tt>.
+     *          enumeration is of type {@code NameClassPair}.
      * @throws  NamingException if a naming exception is encountered
      *
      * @see #list(String)
@@ -478,7 +478,7 @@
      *          the name of the context to list
      * @return  an enumeration of the names and class names of the
      *          bindings in this context.  Each element of the
-     *          enumeration is of type <tt>NameClassPair</tt>.
+     *          enumeration is of type {@code NameClassPair}.
      * @throws  NamingException if a naming exception is encountered
      */
     public NamingEnumeration<NameClassPair> list(String name)
@@ -496,7 +496,7 @@
      *          the name of the context to list
      * @return  an enumeration of the bindings in this context.
      *          Each element of the enumeration is of type
-     *          <tt>Binding</tt>.
+     *          {@code Binding}.
      * @throws  NamingException if a naming exception is encountered
      *
      * @see #listBindings(String)
@@ -515,7 +515,7 @@
      *          the name of the context to list
      * @return  an enumeration of the bindings in this context.
      *          Each element of the enumeration is of type
-     *          <tt>Binding</tt>.
+     *          {@code Binding}.
      * @throws  NamingException if a naming exception is encountered
      */
     public NamingEnumeration<Binding> listBindings(String name)
@@ -529,7 +529,7 @@
      * <p> This method is idempotent.
      * It succeeds even if the terminal atomic name
      * is not bound in the target context, but throws
-     * <tt>NameNotFoundException</tt>
+     * {@code NameNotFoundException}
      * if any of the intermediate contexts do not exist.
      *
      * <p> In a federated naming system, a context from one naming system
@@ -537,11 +537,11 @@
      * look up and perform operations on the foreign context using a
      * composite name.  However, an attempt destroy the context using
      * this composite name will fail with
-     * <tt>NotContextException</tt>, because the foreign context is not
+     * {@code NotContextException}, because the foreign context is not
      * a "subcontext" of the context in which it is bound.
-     * Instead, use <tt>unbind()</tt> to remove the
+     * Instead, use {@code unbind()} to remove the
      * binding of the foreign context.  Destroying the foreign context
-     * requires that the <tt>destroySubcontext()</tt> be performed
+     * requires that the {@code destroySubcontext()} be performed
      * on a context from the foreign context's "native" naming system.
      *
      * @param name
@@ -611,12 +611,12 @@
     /**
      * Retrieves the named object, following links except
      * for the terminal atomic component of the name.
-     * If the object bound to <tt>name</tt> is not a link,
+     * If the object bound to {@code name} is not a link,
      * returns the object itself.
      *
      * @param name
      *          the name of the object to look up
-     * @return  the object bound to <tt>name</tt>, not following the
+     * @return  the object bound to {@code name}, not following the
      *          terminal link (if any).
      * @throws  NamingException if a naming exception is encountered
      *
@@ -631,7 +631,7 @@
      *
      * @param name
      *          the name of the object to look up
-     * @return  the object bound to <tt>name</tt>, not following the
+     * @return  the object bound to {@code name}, not following the
      *          terminal link (if any)
      * @throws  NamingException if a naming exception is encountered
      */
@@ -643,8 +643,8 @@
      * parse names differently.  This method allows an application
      * to get a parser for parsing names into their atomic components
      * using the naming convention of a particular naming system.
-     * Within any single naming system, <tt>NameParser</tt> objects
-     * returned by this method must be equal (using the <tt>equals()</tt>
+     * Within any single naming system, {@code NameParser} objects
+     * returned by this method must be equal (using the {@code equals()}
      * test).
      *
      * @param name
@@ -765,7 +765,7 @@
      * <p> The caller should not make any changes to the object returned:
      * their effect on the context is undefined.
      * The environment of this context may be changed using
-     * <tt>addToEnvironment()</tt> and <tt>removeFromEnvironment()</tt>.
+     * {@code addToEnvironment()} and {@code removeFromEnvironment()}.
      *
      * @return  the environment of this context; never null
      * @throws  NamingException if a naming exception is encountered
@@ -798,7 +798,7 @@
      * The string returned by this method is not a JNDI composite name
      * and should not be passed directly to context methods.
      * In naming systems for which the notion of full name does not
-     * make sense, <tt>OperationNotSupportedException</tt> is thrown.
+     * make sense, {@code OperationNotSupportedException} is thrown.
      *
      * @return  this context's name in its own namespace; never null
      * @throws  OperationNotSupportedException if the naming system does
@@ -821,7 +821,7 @@
      * passed to the initial context constructor,
      * a system property, or an application resource file.
      * If it is not specified in any of these sources,
-     * <tt>NoInitialContextException</tt> is thrown when an initial
+     * {@code NoInitialContextException} is thrown when an initial
      * context is required to complete an operation.
      *
      * <p> The value of this constant is "java.naming.factory.initial".
@@ -882,7 +882,7 @@
      * a URL context factory.
      * This property may be specified in the environment, a system property,
      * or one or more resource files.
-     * The prefix <tt>com.sun.jndi.url</tt> is always appended to
+     * The prefix {@code com.sun.jndi.url} is always appended to
      * the possibly empty list of package prefixes.
      *
      * <p> The value of this constant is "java.naming.factory.url.pkgs".
@@ -920,7 +920,7 @@
      * or a resource file.
      * If it is not specified in any of these sources
      * and the program attempts to use a JNDI URL containing a DNS name,
-     * a <tt>ConfigurationException</tt> will be thrown.
+     * a {@code ConfigurationException} will be thrown.
      *
      * <p> The value of this constant is "java.naming.dns.url".
      *
@@ -974,7 +974,7 @@
      * <dt>"ignore"
      * <dd>ignore referrals
      * <dt>"throw"
-     * <dd>throw <tt>ReferralException</tt> when a referral is encountered.
+     * <dd>throw {@code ReferralException} when a referral is encountered.
      * </dl>
      * If this property is not specified, the default is
      * determined by the provider.
--- a/jdk/src/java.naming/share/classes/javax/naming/InitialContext.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/InitialContext.java	Mon Aug 10 14:05:37 2015 +0300
@@ -49,13 +49,13 @@
  * The first occurrence of the property from the constructor's
  * environment parameter and system properties.
  * <li>
- * The application resource files (<tt>jndi.properties</tt>).
+ * The application resource files ({@code jndi.properties}).
  * </ol>
  * For each property found in both of these two sources, or in
  * more than one application resource file, the property's value
  * is determined as follows.  If the property is
  * one of the standard JNDI properties that specify a list of JNDI
- * factories (see <a href=Context.html#LISTPROPS><tt>Context</tt></a>),
+ * factories (see <a href=Context.html#LISTPROPS>{@code Context}</a>),
  * all of the values are
  * concatenated into a single colon-separated list.  For other
  * properties, only the first value found is used.
@@ -68,23 +68,23 @@
  * An exception to this policy is made when resolving URL strings, as described
  * below.
  *<p>
- * When a URL string (a <tt>String</tt> of the form
+ * When a URL string (a {@code String} of the form
  * <em>scheme_id:rest_of_name</em>) is passed as a name parameter to
  * any method, a URL context factory for handling that scheme is
  * located and used to resolve the URL.  If no such factory is found,
  * the initial context specified by
- * <tt>"java.naming.factory.initial"</tt> is used.  Similarly, when a
- * <tt>CompositeName</tt> object whose first component is a URL string is
+ * {@code "java.naming.factory.initial"} is used.  Similarly, when a
+ * {@code CompositeName} object whose first component is a URL string is
  * passed as a name parameter to any method, a URL context factory is
  * located and used to resolve the first name component.
  * See {@link NamingManager#getURLContext
- * <tt>NamingManager.getURLContext()</tt>} for a description of how URL
+ * NamingManager.getURLContext()} for a description of how URL
  * context factories are located.
  *<p>
  * This default policy of locating the initial context and URL context
  * factories may be overridden
  * by calling
- * <tt>NamingManager.setInitialContextFactoryBuilder()</tt>.
+ * {@code NamingManager.setInitialContextFactoryBuilder()}.
  *<p>
  * NoInitialContextException is thrown when an initial context cannot
  * be instantiated. This exception can be thrown during any interaction
@@ -125,7 +125,7 @@
     /**
      * The environment associated with this InitialContext.
      * It is initialized to null and is updated by the constructor
-     * that accepts an environment or by the <tt>init()</tt> method.
+     * that accepts an environment or by the {@code init()} method.
      * @see #addToEnvironment
      * @see #removeFromEnvironment
      * @see #getEnvironment
@@ -152,14 +152,14 @@
      * Constructs an initial context with the option of not
      * initializing it.  This may be used by a constructor in
      * a subclass when the value of the environment parameter
-     * is not yet known at the time the <tt>InitialContext</tt>
+     * is not yet known at the time the {@code InitialContext}
      * constructor is called.  The subclass's constructor will
      * call this constructor, compute the value of the environment,
-     * and then call <tt>init()</tt> before returning.
+     * and then call {@code init()} before returning.
      *
      * @param lazy
      *          true means do not initialize the initial context; false
-     *          is equivalent to calling <tt>new InitialContext()</tt>
+     *          is equivalent to calling {@code new InitialContext()}
      * @throws  NamingException if a naming exception is encountered
      *
      * @see #init(Hashtable)
@@ -174,7 +174,7 @@
     /**
      * Constructs an initial context.
      * No environment properties are supplied.
-     * Equivalent to <tt>new InitialContext(null)</tt>.
+     * Equivalent to {@code new InitialContext(null)}.
      *
      * @throws  NamingException if a naming exception is encountered
      *
@@ -188,10 +188,10 @@
      * Constructs an initial context using the supplied environment.
      * Environment properties are discussed in the class description.
      *
-     * <p> This constructor will not modify <tt>environment</tt>
+     * <p> This constructor will not modify {@code environment}
      * or save a reference to it, but may save a clone.
      * Caller should not modify mutable keys and values in
-     * <tt>environment</tt> after it has been passed to the constructor.
+     * {@code environment} after it has been passed to the constructor.
      *
      * @param environment
      *          environment used to create the initial context.
@@ -212,7 +212,7 @@
      * Initializes the initial context using the supplied environment.
      * Environment properties are discussed in the class description.
      *
-     * <p> This method will modify <tt>environment</tt> and save
+     * <p> This method will modify {@code environment} and save
      * a reference to it.  The caller may no longer modify it.
      *
      * @param environment
@@ -245,7 +245,7 @@
      *        InitialContext ic = new InitialContext();
      *        Object obj = ic.lookup();
      * </code>
-     * <p> If <tt>name</tt> is empty, returns a new instance of this context
+     * <p> If {@code name} is empty, returns a new instance of this context
      * (which represents the same naming context as this context, but its
      * environment may be modified independently and it may be accessed
      * concurrently).
@@ -253,7 +253,7 @@
      * @param <T> the type of the returned object
      * @param name
      *          the name of the object to look up
-     * @return  the object bound to <tt>name</tt>
+     * @return  the object bound to {@code name}
      * @throws  NamingException if a naming exception is encountered
      *
      * @see #doLookup(String)
@@ -272,7 +272,7 @@
      * @param <T> the type of the returned object
      * @param name
      *          the name of the object to look up
-     * @return  the object bound to <tt>name</tt>
+     * @return  the object bound to {@code name}
      * @throws  NamingException if a naming exception is encountered
      * @since 1.6
      */
@@ -506,7 +506,7 @@
      * this context.
      * Since an initial context may never be named relative
      * to any context other than itself, the value of the
-     * <tt>prefix</tt> parameter must be an empty name (<tt>""</tt>).
+     * {@code prefix} parameter must be an empty name ({@code ""}).
      */
     public String composeName(String name, String prefix)
             throws NamingException {
@@ -518,7 +518,7 @@
      * this context.
      * Since an initial context may never be named relative
      * to any context other than itself, the value of the
-     * <tt>prefix</tt> parameter must be an empty name.
+     * {@code prefix} parameter must be an empty name.
      */
     public Name composeName(Name name, Name prefix)
         throws NamingException
--- a/jdk/src/java.naming/share/classes/javax/naming/LinkException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/LinkException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -204,7 +204,7 @@
     /**
      * Sets the resolved link name field of this exception.
      *<p>
-     * <tt>name</tt> is a composite name. If the intent is to set
+     * {@code name} is a composite name. If the intent is to set
      * this field using a compound name or string, you must
      * "stringify" the compound name, and create a composite
      * name with a single component using the string. You can then
@@ -230,7 +230,7 @@
     /**
      * Sets the remaining link name field of this exception.
      *<p>
-     * <tt>name</tt> is a composite name. If the intent is to set
+     * {@code name} is a composite name. If the intent is to set
      * this field using a compound name or string, you must
      * "stringify" the compound name, and create a composite
      * name with a single component using the string. You can then
--- a/jdk/src/java.naming/share/classes/javax/naming/Name.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/Name.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,12 +28,12 @@
 import java.util.Enumeration;
 
 /**
- * The <tt>Name</tt> interface represents a generic name -- an ordered
+ * The {@code Name} interface represents a generic name -- an ordered
  * sequence of components.  It can be a composite name (names that
  * span multiple namespaces), or a compound name (names that are
  * used within individual hierarchical naming systems).
  *
- * <p> There can be different implementations of <tt>Name</tt>; for example,
+ * <p> There can be different implementations of {@code Name}; for example,
  * composite names, URLs, or namespace-specific compound names.
  *
  * <p> The components of a name are numbered.  The indexes of a name
@@ -46,7 +46,7 @@
  * value for a parameter that is a name or a name component.
  * Likewise, methods that return a name or name component never return null.
  *
- * <p> An instance of a <tt>Name</tt> may not be synchronized against
+ * <p> An instance of a {@code Name} may not be synchronized against
  * concurrent multithreaded access if that access is not read-only.
  *
  * @author Rosanna Lee
@@ -82,7 +82,7 @@
      * Returns a negative integer, zero, or a positive integer as this
      * name is less than, equal to, or greater than the given name.
      *
-     * <p> As with <tt>Object.equals()</tt>, the notion of ordering for names
+     * <p> As with {@code Object.equals()}, the notion of ordering for names
      * depends on the class that implements this interface.
      * For example, the ordering may be
      * based on lexicographical ordering of the name components.
@@ -93,7 +93,7 @@
      * @param   obj the non-null object to compare against.
      * @return  a negative integer, zero, or a positive integer as this name
      *          is less than, equal to, or greater than the given name
-     * @throws  ClassCastException if obj is not a <tt>Name</tt> of a
+     * @throws  ClassCastException if obj is not a {@code Name} of a
      *          type that may be compared with this name
      *
      * @see Comparable#compareTo(Object)
@@ -170,23 +170,23 @@
 
     /**
      * Determines whether this name starts with a specified prefix.
-     * A name <tt>n</tt> is a prefix if it is equal to
-     * <tt>getPrefix(n.size())</tt>.
+     * A name {@code n} is a prefix if it is equal to
+     * {@code getPrefix(n.size())}.
      *
      * @param n
      *          the name to check
-     * @return  true if <tt>n</tt> is a prefix of this name, false otherwise
+     * @return  true if {@code n} is a prefix of this name, false otherwise
      */
     public boolean startsWith(Name n);
 
     /**
      * Determines whether this name ends with a specified suffix.
-     * A name <tt>n</tt> is a suffix if it is equal to
-     * <tt>getSuffix(size()-n.size())</tt>.
+     * A name {@code n} is a suffix if it is equal to
+     * {@code getSuffix(size()-n.size())}.
      *
      * @param n
      *          the name to check
-     * @return  true if <tt>n</tt> is a suffix of this name, false otherwise
+     * @return  true if {@code n} is a suffix of this name, false otherwise
      */
     public boolean endsWith(Name n);
 
@@ -197,7 +197,7 @@
      *          the components to add
      * @return  the updated name (not a new one)
      *
-     * @throws  InvalidNameException if <tt>suffix</tt> is not a valid name,
+     * @throws  InvalidNameException if {@code suffix} is not a valid name,
      *          or if the addition of the components would violate the syntax
      *          rules of this name
      */
@@ -219,7 +219,7 @@
      *
      * @throws  ArrayIndexOutOfBoundsException
      *          if posn is outside the specified range
-     * @throws  InvalidNameException if <tt>n</tt> is not a valid name,
+     * @throws  InvalidNameException if {@code n} is not a valid name,
      *          or if the addition of the components would violate the syntax
      *          rules of this name
      */
@@ -232,7 +232,7 @@
      *          the component to add
      * @return  the updated name (not a new one)
      *
-     * @throws  InvalidNameException if adding <tt>comp</tt> would violate
+     * @throws  InvalidNameException if adding {@code comp} would violate
      *          the syntax rules of this name
      */
     public Name add(String comp) throws InvalidNameException;
@@ -252,7 +252,7 @@
      *
      * @throws  ArrayIndexOutOfBoundsException
      *          if posn is outside the specified range
-     * @throws  InvalidNameException if adding <tt>comp</tt> would violate
+     * @throws  InvalidNameException if adding {@code comp} would violate
      *          the syntax rules of this name
      */
     public Name add(int posn, String comp) throws InvalidNameException;
--- a/jdk/src/java.naming/share/classes/javax/naming/NameClassPair.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/NameClassPair.java	Mon Aug 10 14:05:37 2015 +0300
@@ -60,7 +60,7 @@
     /**
      * Contains the name of this NameClassPair.
      * It is initialized by the constructor and can be updated using
-     * <tt>setName()</tt>.
+     * {@code setName()}.
      * @serial
      * @see #getName
      * @see #setName
@@ -70,7 +70,7 @@
     /**
      *Contains the class name contained in this NameClassPair.
      * It is initialized by the constructor and can be updated using
-     * <tt>setClassName()</tt>.
+     * {@code setClassName()}.
      * @serial
      * @see #getClassName
      * @see #setClassName
@@ -80,7 +80,7 @@
     /**
      * Contains the full name of this NameClassPair within its
      * own namespace.
-     * It is initialized using <tt>setNameInNamespace()</tt>
+     * It is initialized using {@code setNameInNamespace()}
      * @serial
      * @see #getNameInNamespace
      * @see #setNameInNamespace
@@ -89,10 +89,10 @@
 
 
     /**
-     * Records whether the name of this <tt>NameClassPair</tt>
+     * Records whether the name of this {@code NameClassPair}
      * is relative to the target context.
      * It is initialized by the constructor and can be updated using
-     * <tt>setRelative()</tt>.
+     * {@code setRelative()}.
      * @serial
      * @see #isRelative
      * @see #setRelative
@@ -148,7 +148,7 @@
      * Retrieves the class name of the object bound to the name of this binding.
      * If a reference or some other indirect information is bound,
      * retrieves the class name of the eventual object that
-     * will be returned by <tt>Binding.getObject()</tt>.
+     * will be returned by {@code Binding.getObject()}.
      *
      * @return  The possibly null class name of object bound.
      *          It is null if the object bound is null.
@@ -162,10 +162,10 @@
 
     /**
      * Retrieves the name of this binding.
-     * If <tt>isRelative()</tt> is true, this name is relative to the
+     * If {@code isRelative()} is true, this name is relative to the
      * target context (which is named by the first parameter of the
-     * <tt>list()</tt>).
-     * If <tt>isRelative()</tt> is false, this name is a URL string.
+     * {@code list()}).
+     * If {@code isRelative()} is false, this name is a URL string.
      *
      * @return  The non-null name of this binding.
      * @see #isRelative
@@ -190,7 +190,7 @@
      * Sets the class name of this binding.
      *
      * @param   name the possibly null string to use as the class name.
-     * If null, <tt>Binding.getClassName()</tt> will return
+     * If null, {@code Binding.getClassName()} will return
      * the actual class name of the object in the binding.
      * The class name will be null if the object bound is null.
      * @see #getClassName
@@ -236,7 +236,7 @@
      * <p>
      *
      * In naming systems for which the notion of full name does not
-     * apply to this binding an <tt>UnsupportedOperationException</tt>
+     * apply to this binding an {@code UnsupportedOperationException}
      * is thrown.
      * This exception is also thrown when a service provider written before
      * the introduction of the method is in use.
@@ -261,11 +261,11 @@
     /**
      * Sets the full name of this binding.
      * This method must be called to set the full name whenever a
-     * <tt>NameClassPair</tt> is created and a full name is
+     * {@code NameClassPair} is created and a full name is
      * applicable to this binding.
      * <p>
      * Setting the full name to null, or not setting it at all, will
-     * cause <tt>getNameInNamespace()</tt> to throw an exception.
+     * cause {@code getNameInNamespace()} to throw an exception.
      *
      * @param fullName The full name to use.
      * @since 1.5
--- a/jdk/src/java.naming/share/classes/javax/naming/NamingEnumeration.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/NamingEnumeration.java	Mon Aug 10 14:05:37 2015 +0300
@@ -85,7 +85,7 @@
       * retrieving the next element to be caught and handled
       * by the application.
       * <p>
-      * Note that <tt>next()</tt> can also throw the runtime exception
+      * Note that {@code next()} can also throw the runtime exception
       * NoSuchElementException to indicate that the caller is
       * attempting to enumerate beyond the end of the enumeration.
       * This is different from a NamingException, which indicates
@@ -128,16 +128,16 @@
      * its methods will yield undefined results.
      * This method is intended for aborting an enumeration to free up resources.
      * If an enumeration proceeds to the end--that is, until
-     * <tt>hasMoreElements()</tt> or <tt>hasMore()</tt> returns <tt>false</tt>--
+     * {@code hasMoreElements()} or {@code hasMore()} returns {@code false}--
      * resources will be freed up automatically and there is no need to
-     * explicitly call <tt>close()</tt>.
+     * explicitly call {@code close()}.
      *<p>
      * This method indicates to the service provider that it is free
      * to release resources associated with the enumeration, and can
-     * notify servers to cancel any outstanding requests. The <tt>close()</tt>
+     * notify servers to cancel any outstanding requests. The {@code close()}
      * method is a hint to implementations for managing their resources.
      * Implementations are encouraged to use appropriate algorithms to
-     * manage their resources when client omits the <tt>close()</tt> calls.
+     * manage their resources when client omits the {@code close()} calls.
      *
      * @exception NamingException If a naming exception is encountered
      * while closing the enumeration.
--- a/jdk/src/java.naming/share/classes/javax/naming/NamingException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/NamingException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -194,14 +194,14 @@
     /**
      * Sets the resolved name field of this exception.
      *<p>
-     * <tt>name</tt> is a composite name. If the intent is to set
+     * {@code name} is a composite name. If the intent is to set
      * this field using a compound name or string, you must
      * "stringify" the compound name, and create a composite
      * name with a single component using the string. You can then
      * invoke this method using the resulting composite name.
      *<p>
-     * A copy of <code>name</code> is made and stored.
-     * Subsequent changes to <code>name</code> do not
+     * A copy of {@code name} is made and stored.
+     * Subsequent changes to {@code name} do not
      * affect the copy in this NamingException and vice versa.
      *
      * @param name The possibly null name to set resolved name to.
@@ -218,14 +218,14 @@
     /**
      * Sets the remaining name field of this exception.
      *<p>
-     * <tt>name</tt> is a composite name. If the intent is to set
+     * {@code name} is a composite name. If the intent is to set
      * this field using a compound name or string, you must
      * "stringify" the compound name, and create a composite
      * name with a single component using the string. You can then
      * invoke this method using the resulting composite name.
      *<p>
-     * A copy of <code>name</code> is made and stored.
-     * Subsequent changes to <code>name</code> do not
+     * A copy of {@code name} is made and stored.
+     * Subsequent changes to {@code name} do not
      * affect the copy in this NamingException and vice versa.
      * @param name The possibly null name to set remaining name to.
      *          If null, it sets the remaining name field to null.
@@ -275,11 +275,11 @@
       * Add components from 'name' as the last components in
       * remaining name.
       *<p>
-      * <tt>name</tt> is a composite name. If the intent is to append
+      * {@code name} is a composite name. If the intent is to append
       * a compound name, you should "stringify" the compound name
       * then invoke the overloaded form that accepts a String parameter.
       *<p>
-      * Subsequent changes to <code>name</code> do not
+      * Subsequent changes to {@code name} do not
       * affect the remaining name field in this NamingException and vice versa.
       * @param name The possibly null name containing ordered components to add.
       *                 If name is null, this method does not do anything.
@@ -326,7 +326,7 @@
 
     /**
       * Records the root cause of this NamingException.
-      * If <tt>e</tt> is <tt>this</tt>, this method does not do anything.
+      * If {@code e} is {@code this}, this method does not do anything.
       *<p>
       * This method predates the general-purpose exception chaining facility.
       * The {@link #initCause(Throwable)} method is now the preferred means
@@ -348,10 +348,10 @@
     /**
       * Returns the cause of this exception.  The cause is the
       * throwable that caused this naming exception to be thrown.
-      * Returns <code>null</code> if the cause is nonexistent or
+      * Returns {@code null} if the cause is nonexistent or
       * unknown.
       *
-      * @return  the cause of this exception, or <code>null</code> if the
+      * @return  the cause of this exception, or {@code null} if the
       *          cause is nonexistent or unknown.
       * @see #initCause(Throwable)
       * @since 1.4
@@ -368,10 +368,10 @@
       * This method may be called at most once.
       *
       * @param  cause   the cause, which is saved for later retrieval by
-      *         the {@link #getCause()} method.  A <tt>null</tt> value
+      *         the {@link #getCause()} method.  A {@code null} value
       *         indicates that the cause is nonexistent or unknown.
-      * @return a reference to this <code>NamingException</code> instance.
-      * @throws IllegalArgumentException if <code>cause</code> is this
+      * @return a reference to this {@code NamingException} instance.
+      * @throws IllegalArgumentException if {@code cause} is this
       *         exception.  (A throwable cannot be its own cause.)
       * @throws IllegalStateException if this method has already
       *         been called on this exception.
--- a/jdk/src/java.naming/share/classes/javax/naming/Reference.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/Reference.java	Mon Aug 10 14:05:37 2015 +0300
@@ -250,7 +250,7 @@
       * its effects on this enumeration are undefined.
       *
       * @return An non-null enumeration of the addresses
-      *         (<tt>RefAddr</tt>) in this reference.
+      *         ({@code RefAddr}) in this reference.
       *         If this reference has zero addresses, an enumeration with
       *         zero elements is returned.
       */
--- a/jdk/src/java.naming/share/classes/javax/naming/ReferralException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ReferralException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -33,12 +33,12 @@
  * such as that returned by LDAP v3 servers.
  * <p>
  * A service provider provides
- * a subclass of <tt>ReferralException</tt> by providing implementations
- * for <tt>getReferralInfo()</tt> and <tt>getReferralContext()</tt> (and appropriate
+ * a subclass of {@code ReferralException} by providing implementations
+ * for {@code getReferralInfo()} and {@code getReferralContext()} (and appropriate
  * constructors and/or corresponding "set" methods).
  * <p>
- * The following code sample shows how <tt>ReferralException</tt> can be used.
- * <blockquote>{@code
+ * The following code sample shows how {@code ReferralException} can be used.
+ * <blockquote><pre>{@code
  *      while (true) {
  *          try {
  *              bindings = ctx.listBindings(name);
@@ -51,12 +51,12 @@
  *              ctx = e.getReferralContext();
  *          }
  *      }
- * }</blockquote>
+ * }</pre></blockquote>
  *<p>
- * <tt>ReferralException</tt> is an abstract class. Concrete implementations
+ * {@code ReferralException} is an abstract class. Concrete implementations
  * determine its synchronization and serialization properties.
  *<p>
- * An environment parameter passed to the <tt>getReferralContext()</tt>
+ * An environment parameter passed to the {@code getReferralContext()}
  * method is owned by the caller.
  * The service provider will not modify the object or keep a reference to it,
  * but may keep a reference to a clone of it.
@@ -114,7 +114,7 @@
      *
      * @return The non-null context at which to continue the method.
      * @exception NamingException If a naming exception was encountered.
-     * Call either <tt>retryReferral()</tt> or <tt>skipReferral()</tt>
+     * Call either {@code retryReferral()} or {@code skipReferral()}
      * to continue processing referrals.
      */
     public abstract Context getReferralContext() throws NamingException;
@@ -127,7 +127,7 @@
      * enumeration, the referral exception should provide a context
      * at which to continue the operation.
      *<p>
-     * The referral context is created using <tt>env</tt> as its environment
+     * The referral context is created using {@code env} as its environment
      * properties.
      * This method should be used instead of the no-arg overloaded form
      * when the caller needs to use different environment properties for
@@ -143,7 +143,7 @@
      *
      * @return The non-null context at which to continue the method.
      * @exception NamingException If a naming exception was encountered.
-     * Call either <tt>retryReferral()</tt> or <tt>skipReferral()</tt>
+     * Call either {@code retryReferral()} or {@code skipReferral()}
      * to continue processing referrals.
      */
     public abstract Context
@@ -153,7 +153,7 @@
     /**
      * Discards the referral about to be processed.
      * A call to this method should be followed by a call to
-     * <code>getReferralContext</code> to allow the processing of
+     * {@code getReferralContext} to allow the processing of
      * other referrals to continue.
      * The following code fragment shows a typical usage pattern.
      * <blockquote><pre>
@@ -174,7 +174,7 @@
     /**
      * Retries the referral currently being processed.
      * A call to this method should be followed by a call to
-     * <code>getReferralContext</code> to allow the current
+     * {@code getReferralContext} to allow the current
      * referral to be retried.
      * The following code fragment shows a typical usage pattern.
      * <blockquote><pre>
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/Attribute.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/Attribute.java	Mon Aug 10 14:05:37 2015 +0300
@@ -37,34 +37,34 @@
   * This interface represents an attribute associated with a named object.
   *<p>
   * In a directory, named objects can have associated with them
-  * attributes.  The <tt>Attribute</tt> interface represents an attribute associated
+  * attributes.  The {@code Attribute} interface represents an attribute associated
   * with a named object.  An attribute contains 0 or more, possibly null, values.
-  * The attribute values can be ordered or unordered (see <tt>isOrdered()</tt>).
+  * The attribute values can be ordered or unordered (see {@code isOrdered()}).
   * If the values are unordered, no duplicates are allowed.
   * If the values are ordered, duplicates are allowed.
   *<p>
   * The content and representation of an attribute and its values is defined by
   * the attribute's <em>schema</em>. The schema contains information
   * about the attribute's syntax and other properties about the attribute.
-  * See <tt>getAttributeDefinition()</tt> and
-  * <tt>getAttributeSyntaxDefinition()</tt>
+  * See {@code getAttributeDefinition()} and
+  * {@code getAttributeSyntaxDefinition()}
   * for details regarding how to get schema information about an attribute
   * if the underlying directory service supports schemas.
   *<p>
   * Equality of two attributes is determined by the implementation class.
-  * A simple implementation can use <tt>Object.equals()</tt> to determine equality
+  * A simple implementation can use {@code Object.equals()} to determine equality
   * of attribute values, while a more sophisticated implementation might
   * make use of schema information to determine equality.
   * Similarly, one implementation might provide a static storage
   * structure which simply returns the values passed to its
-  * constructor, while another implementation might define <tt>get()</tt> and
-  * <tt>getAll()</tt>.
+  * constructor, while another implementation might define {@code get()} and
+  * {@code getAll()}.
   * to get the values dynamically from the directory.
   *<p>
-  * Note that updates to <tt>Attribute</tt> (such as adding or removing a
+  * Note that updates to {@code Attribute} (such as adding or removing a
   * value) do not affect the corresponding representation of the attribute
   * in the directory.  Updates to the directory can only be effected
-  * using operations in the <tt>DirContext</tt> interface.
+  * using operations in the {@code DirContext} interface.
   *
   * @author Rosanna Lee
   * @author Scott Seligman
@@ -129,7 +129,7 @@
     /**
       * Determines whether a value is in the attribute.
       * Equality is determined by the implementation, which may use
-      * <tt>Object.equals()</tt> or schema information to determine equality.
+      * {@code Object.equals()} or schema information to determine equality.
       *
       * @param attrVal The possibly null value to check. If null, check
       *  whether the attribute has an attribute value whose value is null.
@@ -141,12 +141,12 @@
     /**
       * Adds a new value to the attribute.
       * If the attribute values are unordered and
-      * <tt>attrVal</tt> is already in the attribute, this method does nothing.
-      * If the attribute values are ordered, <tt>attrVal</tt> is added to the end of
+      * {@code attrVal} is already in the attribute, this method does nothing.
+      * If the attribute values are ordered, {@code attrVal} is added to the end of
       * the list of attribute values.
       *<p>
       * Equality is determined by the implementation, which may use
-      * <tt>Object.equals()</tt> or schema information to determine equality.
+      * {@code Object.equals()} or schema information to determine equality.
       *
       * @param attrVal The new possibly null value to add. If null, null
       *  is added as an attribute value.
@@ -156,15 +156,15 @@
 
     /**
       * Removes a specified value from the attribute.
-      * If <tt>attrval</tt> is not in the attribute, this method does nothing.
+      * If {@code attrval} is not in the attribute, this method does nothing.
       * If the attribute values are ordered, the first occurrence of
-      * <tt>attrVal</tt> is removed and attribute values at indices greater
+      * {@code attrVal} is removed and attribute values at indices greater
       * than the removed
       * value are shifted up towards the head of the list (and their indices
       * decremented by one).
       *<p>
       * Equality is determined by the implementation, which may use
-      * <tt>Object.equals()</tt> or schema information to determine equality.
+      * {@code Object.equals()} or schema information to determine equality.
       *
       * @param attrval The possibly null value to remove from this attribute.
       * If null, remove the attribute value that is null.
@@ -260,66 +260,66 @@
 
     /**
      * Retrieves the attribute value from the ordered list of attribute values.
-     * This method returns the value at the <tt>ix</tt> index of the list of
+     * This method returns the value at the {@code ix} index of the list of
      * attribute values.
      * If the attribute values are unordered,
      * this method returns the value that happens to be at that index.
      * @param ix The index of the value in the ordered list of attribute values.
      * {@code 0 <= ix < size()}.
-     * @return The possibly null attribute value at index <tt>ix</tt>;
+     * @return The possibly null attribute value at index {@code ix};
      *   null if the attribute value is null.
      * @exception NamingException If a naming exception was encountered while
      * retrieving the value.
-     * @exception IndexOutOfBoundsException If <tt>ix</tt> is outside the specified range.
+     * @exception IndexOutOfBoundsException If {@code ix} is outside the specified range.
      */
     Object get(int ix) throws NamingException;
 
     /**
      * Removes an attribute value from the ordered list of attribute values.
-     * This method removes the value at the <tt>ix</tt> index of the list of
+     * This method removes the value at the {@code ix} index of the list of
      * attribute values.
      * If the attribute values are unordered,
      * this method removes the value that happens to be at that index.
-     * Values located at indices greater than <tt>ix</tt> are shifted up towards
+     * Values located at indices greater than {@code ix} are shifted up towards
      * the front of the list (and their indices decremented by one).
      *
      * @param ix The index of the value to remove.
      * {@code 0 <= ix < size()}.
-     * @return The possibly null attribute value at index <tt>ix</tt> that was removed;
+     * @return The possibly null attribute value at index {@code ix} that was removed;
      *   null if the attribute value is null.
-     * @exception IndexOutOfBoundsException If <tt>ix</tt> is outside the specified range.
+     * @exception IndexOutOfBoundsException If {@code ix} is outside the specified range.
      */
     Object remove(int ix);
 
     /**
      * Adds an attribute value to the ordered list of attribute values.
-     * This method adds <tt>attrVal</tt> to the list of attribute values at
-     * index <tt>ix</tt>.
-     * Values located at indices at or greater than <tt>ix</tt> are
+     * This method adds {@code attrVal} to the list of attribute values at
+     * index {@code ix}.
+     * Values located at indices at or greater than {@code ix} are
      * shifted down towards the end of the list (and their indices incremented
      * by one).
-     * If the attribute values are unordered and already have <tt>attrVal</tt>,
-     * <tt>IllegalStateException</tt> is thrown.
+     * If the attribute values are unordered and already have {@code attrVal},
+     * {@code IllegalStateException} is thrown.
      *
      * @param ix The index in the ordered list of attribute values to add the new value.
      * {@code 0 <= ix <= size()}.
      * @param attrVal The possibly null attribute value to add; if null, null is
      * the value added.
-     * @exception IndexOutOfBoundsException If <tt>ix</tt> is outside the specified range.
+     * @exception IndexOutOfBoundsException If {@code ix} is outside the specified range.
      * @exception IllegalStateException If the attribute values are unordered and
-     * <tt>attrVal</tt> is one of those values.
+     * {@code attrVal} is one of those values.
      */
     void add(int ix, Object attrVal);
 
 
     /**
      * Sets an attribute value in the ordered list of attribute values.
-     * This method sets the value at the <tt>ix</tt> index of the list of
-     * attribute values to be <tt>attrVal</tt>. The old value is removed.
+     * This method sets the value at the {@code ix} index of the list of
+     * attribute values to be {@code attrVal}. The old value is removed.
      * If the attribute values are unordered,
      * this method sets the value that happens to be at that index
-     * to <tt>attrVal</tt>, unless <tt>attrVal</tt> is already one of the values.
-     * In that case, <tt>IllegalStateException</tt> is thrown.
+     * to {@code attrVal}, unless {@code attrVal} is already one of the values.
+     * In that case, {@code IllegalStateException} is thrown.
      *
      * @param ix The index of the value in the ordered list of attribute values.
      * {@code 0 <= ix < size()}.
@@ -327,8 +327,8 @@
      * If null, 'null' replaces the old value.
      * @return The possibly null attribute value at index ix that was replaced.
      *   Null if the attribute value was null.
-     * @exception IndexOutOfBoundsException If <tt>ix</tt> is outside the specified range.
-     * @exception IllegalStateException If <tt>attrVal</tt> already exists and the
+     * @exception IndexOutOfBoundsException If {@code ix} is outside the specified range.
+     * @exception IllegalStateException If {@code attrVal} already exists and the
      *    attribute values are unordered.
      */
     Object set(int ix, Object attrVal);
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/Attributes.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/Attributes.java	Mon Aug 10 14:05:37 2015 +0300
@@ -103,7 +103,7 @@
       * are undefined.
       *
       * @return A non-null enumeration of the attributes in this attribute set.
-      *         Each element of the enumeration is of class <tt>Attribute</tt>.
+      *         Each element of the enumeration is of class {@code Attribute}.
       *         If attribute set has zero attributes, an empty enumeration
       *         is returned.
       */
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttribute.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttribute.java	Mon Aug 10 14:05:37 2015 +0300
@@ -35,35 +35,35 @@
 import javax.naming.OperationNotSupportedException;
 
 /**
-  * This class provides a basic implementation of the <tt>Attribute</tt> interface.
+  * This class provides a basic implementation of the {@code Attribute} interface.
   *<p>
   * This implementation does not support the schema methods
-  * <tt>getAttributeDefinition()</tt> and <tt>getAttributeSyntaxDefinition()</tt>.
-  * They simply throw <tt>OperationNotSupportedException</tt>.
-  * Subclasses of <tt>BasicAttribute</tt> should override these methods if they
+  * {@code getAttributeDefinition()} and {@code getAttributeSyntaxDefinition()}.
+  * They simply throw {@code OperationNotSupportedException}.
+  * Subclasses of {@code BasicAttribute} should override these methods if they
   * support them.
   *<p>
-  * The <tt>BasicAttribute</tt> class by default uses <tt>Object.equals()</tt> to
+  * The {@code BasicAttribute} class by default uses {@code Object.equals()} to
   * determine equality of attribute values when testing for equality or
   * when searching for values, <em>except</em> when the value is an array.
-  * For an array, each element of the array is checked using <tt>Object.equals()</tt>.
-  * Subclasses of <tt>BasicAttribute</tt> can make use of schema information
+  * For an array, each element of the array is checked using {@code Object.equals()}.
+  * Subclasses of {@code BasicAttribute} can make use of schema information
   * when doing similar equality checks by overriding methods
   * in which such use of schema is meaningful.
-  * Similarly, the <tt>BasicAttribute</tt> class by default returns the values passed to its
+  * Similarly, the {@code BasicAttribute} class by default returns the values passed to its
   * constructor and/or manipulated using the add/remove methods.
-  * Subclasses of <tt>BasicAttribute</tt> can override <tt>get()</tt> and <tt>getAll()</tt>
+  * Subclasses of {@code BasicAttribute} can override {@code get()} and {@code getAll()}
   * to get the values dynamically from the directory (or implement
-  * the <tt>Attribute</tt> interface directly instead of subclassing <tt>BasicAttribute</tt>).
+  * the {@code Attribute} interface directly instead of subclassing {@code BasicAttribute}).
   *<p>
-  * Note that updates to <tt>BasicAttribute</tt> (such as adding or removing a value)
+  * Note that updates to {@code BasicAttribute} (such as adding or removing a value)
   * does not affect the corresponding representation of the attribute
   * in the directory.  Updates to the directory can only be effected
-  * using operations in the <tt>DirContext</tt> interface.
+  * using operations in the {@code DirContext} interface.
   *<p>
-  * A <tt>BasicAttribute</tt> instance is not synchronized against concurrent
+  * A {@code BasicAttribute} instance is not synchronized against concurrent
   * multithreaded access. Multiple threads trying to access and modify a
-  * <tt>BasicAttribute</tt> should lock the object.
+  * {@code BasicAttribute} should lock the object.
   *
   * @author Rosanna Lee
   * @author Scott Seligman
@@ -112,16 +112,16 @@
       * order the values must match.
       * If obj is null or not an Attribute, false is returned.
       *<p>
-      * By default <tt>Object.equals()</tt> is used when comparing the attribute
+      * By default {@code Object.equals()} is used when comparing the attribute
       * id and its values except when a value is an array. For an array,
-      * each element of the array is checked using <tt>Object.equals()</tt>.
+      * each element of the array is checked using {@code Object.equals()}.
       * A subclass may override this to make
       * use of schema syntax information and matching rules,
       * which define what it means for two attributes to be equal.
       * How and whether a subclass makes
       * use of the schema information is determined by the subclass.
-      * If a subclass overrides <tt>equals()</tt>, it should also override
-      * <tt>hashCode()</tt>
+      * If a subclass overrides {@code equals()}, it should also override
+      * {@code hashCode()}
       * such that two attributes that are equal have the same hash code.
       *
       * @param obj      The possibly null object to check.
@@ -172,8 +172,8 @@
       * the attribute's id and that of all of its values except for
       * values that are arrays.
       * For an array, the hash code of each element of the array is summed.
-      * If a subclass overrides <tt>hashCode()</tt>, it should override
-      * <tt>equals()</tt>
+      * If a subclass overrides {@code hashCode()}, it should override
+      * {@code equals()}
       * as well so that two attributes that are equal have the same hash code.
       *
       * @return an int representing the hash code of this attribute.
@@ -315,10 +315,10 @@
       * Determines whether a value is in this attribute.
       *<p>
       * By default,
-      * <tt>Object.equals()</tt> is used when comparing <tt>attrVal</tt>
-      * with this attribute's values except when <tt>attrVal</tt> is an array.
+      * {@code Object.equals()} is used when comparing {@code attrVal}
+      * with this attribute's values except when {@code attrVal} is an array.
       * For an array, each element of the array is checked using
-      * <tt>Object.equals()</tt>.
+      * {@code Object.equals()}.
       * A subclass may use schema information to determine equality.
       */
     public boolean contains(Object attrVal) {
@@ -352,7 +352,7 @@
 
     /**
      * Determines whether two attribute values are equal.
-     * Use arrayEquals for arrays and <tt>Object.equals()</tt> otherwise.
+     * Use arrayEquals for arrays and {@code Object.equals()} otherwise.
      */
     private static boolean valueEquals(Object obj1, Object obj2) {
         if (obj1 == obj2) {
@@ -370,7 +370,7 @@
 
     /**
      * Determines whether two arrays are equal by comparing each of their
-     * elements using <tt>Object.equals()</tt>.
+     * elements using {@code Object.equals()}.
      */
     private static boolean arrayEquals(Object a1, Object a2) {
         int len;
@@ -393,10 +393,10 @@
     /**
       * Adds a new value to this attribute.
       *<p>
-      * By default, <tt>Object.equals()</tt> is used when comparing <tt>attrVal</tt>
-      * with this attribute's values except when <tt>attrVal</tt> is an array.
+      * By default, {@code Object.equals()} is used when comparing {@code attrVal}
+      * with this attribute's values except when {@code attrVal} is an array.
       * For an array, each element of the array is checked using
-      * <tt>Object.equals()</tt>.
+      * {@code Object.equals()}.
       * A subclass may use schema information to determine equality.
       */
     public boolean add(Object attrVal) {
@@ -411,10 +411,10 @@
     /**
       * Removes a specified value from this attribute.
       *<p>
-      * By default, <tt>Object.equals()</tt> is used when comparing <tt>attrVal</tt>
-      * with this attribute's values except when <tt>attrVal</tt> is an array.
+      * By default, {@code Object.equals()} is used when comparing {@code attrVal}
+      * with this attribute's values except when {@code attrVal} is an array.
       * For an array, each element of the array is checked using
-      * <tt>Object.equals()</tt>.
+      * {@code Object.equals()}.
       * A subclass may use schema information to determine equality.
       */
     public boolean remove(Object attrval) {
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttributes.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttributes.java	Mon Aug 10 14:05:37 2015 +0300
@@ -207,17 +207,17 @@
     }
 
     /**
-     * Determines whether this <tt>BasicAttributes</tt> is equal to another
-     * <tt>Attributes</tt>
-     * Two <tt>Attributes</tt> are equal if they are both instances of
-     * <tt>Attributes</tt>,
+     * Determines whether this {@code BasicAttributes} is equal to another
+     * {@code Attributes}
+     * Two {@code Attributes} are equal if they are both instances of
+     * {@code Attributes},
      * treat the case of attribute IDs the same way, and contain the
-     * same attributes. Each <tt>Attribute</tt> in this <tt>BasicAttributes</tt>
-     * is checked for equality using <tt>Object.equals()</tt>, which may have
-     * be overridden by implementations of <tt>Attribute</tt>).
-     * If a subclass overrides <tt>equals()</tt>,
-     * it should override <tt>hashCode()</tt>
-     * as well so that two <tt>Attributes</tt> instances that are equal
+     * same attributes. Each {@code Attribute} in this {@code BasicAttributes}
+     * is checked for equality using {@code Object.equals()}, which may have
+     * be overridden by implementations of {@code Attribute}).
+     * If a subclass overrides {@code equals()},
+     * it should override {@code hashCode()}
+     * as well so that two {@code Attributes} instances that are equal
      * have the same hash code.
      * @param obj the possibly null object to compare against.
      *
@@ -259,9 +259,9 @@
      * The hash code is computed by adding the hash code of
      * the attributes of this object. If this BasicAttributes
      * ignores case of its attribute IDs, one is added to the hash code.
-     * If a subclass overrides <tt>hashCode()</tt>,
-     * it should override <tt>equals()</tt>
-     * as well so that two <tt>Attributes</tt> instances that are equal
+     * If a subclass overrides {@code hashCode()},
+     * it should override {@code equals()}
+     * as well so that two {@code Attributes} instances that are equal
      * have the same hash code.
      *
      * @return an int representing the hash code of this BasicAttributes instance.
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/DirContext.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/DirContext.java	Mon Aug 10 14:05:37 2015 +0300
@@ -33,7 +33,7 @@
  * associated with objects, and for searching the directory.
  *
  * <h1>Names</h1>
- * Each name passed as an argument to a <tt>DirContext</tt> method is relative
+ * Each name passed as an argument to a {@code DirContext} method is relative
  * to that context.  The empty name is used to name the context itself.
  * The name parameter may never be null.
  * <p>
@@ -47,9 +47,9 @@
  * The second version instead has a link to the first:  the same
  * documentation applies to both.
  * <p>
- * See <tt>Context</tt> for a discussion on the interpretation of the
- * name argument to the <tt>Context</tt> methods. These same rules
- * apply to the name argument to the <tt>DirContext</tt> methods.
+ * See {@code Context} for a discussion on the interpretation of the
+ * name argument to the {@code Context} methods. These same rules
+ * apply to the name argument to the {@code DirContext} methods.
  *
  * <h1>Attribute Models</h1>
  * There are two basic models of what attributes should be
@@ -82,7 +82,7 @@
  * within the parent object and associated with the object's name.
  *
  * <h1>Attribute Type Names</h1>
- * In the <tt>getAttributes()</tt> and <tt>search()</tt> methods,
+ * In the {@code getAttributes()} and {@code search()} methods,
  * you can supply the attributes to return by supplying a list of
  * attribute names (strings).
  * The attributes that you get back might not have the same names as the
@@ -120,9 +120,9 @@
  * purposes. An example of operational attributes is the access control
  * list for an object.
  * <p>
- * In the <tt>getAttributes()</tt> and <tt>search()</tt> methods,
+ * In the {@code getAttributes()} and {@code search()} methods,
  * you can specify that all attributes associated with the requested objects
- * be returned by supply <tt>null</tt> as the list of attributes to return.
+ * be returned by supply {@code null} as the list of attributes to return.
  * The attributes returned do <em>not</em> include operational attributes.
  * In order to retrieve operational attributes, you must name them explicitly.
  *
@@ -140,13 +140,13 @@
  *
  *<h1>Parameters</h1>
  *<p>
- * An <tt>Attributes</tt>, <tt>SearchControls</tt>, or array object
+ * An {@code Attributes}, {@code SearchControls}, or array object
  * passed as a parameter to any method will not be modified by the
  * service provider.  The service provider may keep a reference to it
  * for the duration of the operation, including any enumeration of the
  * method's results and the processing of any referrals generated.
  * The caller should not modify the object during this time.
- * An <tt>Attributes</tt> object returned by any method is owned by
+ * An {@code Attributes} object returned by any method is owned by
  * the caller.  The caller may subsequently modify it; the service
  * provider will not.
  *
@@ -254,7 +254,7 @@
      * If attempting to add more than one value to a single-valued attribute,
      * throws <code>InvalidAttributeValueException</code>.
      * <p>
-     * The value of this constant is <tt>1</tt>.
+     * The value of this constant is {@code 1}.
      *
      * @see ModificationItem
      * @see #modifyAttributes
@@ -273,7 +273,7 @@
      * attempting to add more than one value to a single-valued attribute,
      * throws <code>InvalidAttributeValueException</code>.
      * <p>
-     * The value of this constant is <tt>2</tt>.
+     * The value of this constant is {@code 2}.
      *
      * @see ModificationItem
      * @see #modifyAttributes
@@ -294,7 +294,7 @@
      * Removal of the last value will remove the attribute if the
      * attribute is required to have at least one value.
      * <p>
-     * The value of this constant is <tt>3</tt>.
+     * The value of this constant is {@code 3}.
      *
      * @see ModificationItem
      * @see #modifyAttributes
@@ -391,12 +391,12 @@
 
     /**
      * Binds a name to an object, along with associated attributes.
-     * If <tt>attrs</tt> is null, the resulting binding will have
-     * the attributes associated with <tt>obj</tt> if <tt>obj</tt> is a
-     * <tt>DirContext</tt>, and no attributes otherwise.
-     * If <tt>attrs</tt> is non-null, the resulting binding will have
-     * <tt>attrs</tt> as its attributes; any attributes associated with
-     * <tt>obj</tt> are ignored.
+     * If {@code attrs} is null, the resulting binding will have
+     * the attributes associated with {@code obj} if {@code obj} is a
+     * {@code DirContext}, and no attributes otherwise.
+     * If {@code attrs} is non-null, the resulting binding will have
+     * {@code attrs} as its attributes; any attributes associated with
+     * {@code obj} are ignored.
      *
      * @param name
      *          the name to bind; may not be empty
@@ -438,16 +438,16 @@
     /**
      * Binds a name to an object, along with associated attributes,
      * overwriting any existing binding.
-     * If <tt>attrs</tt> is null and <tt>obj</tt> is a <tt>DirContext</tt>,
-     * the attributes from <tt>obj</tt> are used.
-     * If <tt>attrs</tt> is null and <tt>obj</tt> is not a <tt>DirContext</tt>,
+     * If {@code attrs} is null and {@code obj} is a {@code DirContext},
+     * the attributes from {@code obj} are used.
+     * If {@code attrs} is null and {@code obj} is not a {@code DirContext},
      * any existing attributes associated with the object already bound
      * in the directory remain unchanged.
-     * If <tt>attrs</tt> is non-null, any existing attributes associated with
-     * the object already bound in the directory are removed and <tt>attrs</tt>
-     * is associated with the named object.  If <tt>obj</tt> is a
-     * <tt>DirContext</tt> and <tt>attrs</tt> is non-null, the attributes
-     * of <tt>obj</tt> are ignored.
+     * If {@code attrs} is non-null, any existing attributes associated with
+     * the object already bound in the directory are removed and {@code attrs}
+     * is associated with the named object.  If {@code obj} is a
+     * {@code DirContext} and {@code attrs} is non-null, the attributes
+     * of {@code obj} are ignored.
      *
      * @param name
      *          the name to bind; may not be empty
@@ -492,8 +492,8 @@
      * component of the name), and associates the supplied attributes
      * with the newly created object.
      * All intermediate and target contexts must already exist.
-     * If <tt>attrs</tt> is null, this method is equivalent to
-     * <tt>Context.createSubcontext()</tt>.
+     * If {@code attrs} is null, this method is equivalent to
+     * {@code Context.createSubcontext()}.
      *
      * @param name
      *          the name of the context to create; may not be empty
@@ -579,8 +579,8 @@
      * "object class" being referred to here is in the directory sense
      * rather than in the Java sense.
      * For example, if the named object is a directory object of
-     * "Person" class, <tt>getSchemaClassDefinition()</tt> would return a
-     * <tt>DirContext</tt> representing the (directory's) object class
+     * "Person" class, {@code getSchemaClassDefinition()} would return a
+     * {@code DirContext} representing the (directory's) object class
      * definition of "Person".
      *<p>
      * The information that can be retrieved from an object class definition
@@ -589,13 +589,13 @@
      * Prior to JNDI 1.2, this method
      * returned a single schema object representing the class definition of
      * the named object.
-     * Since JNDI 1.2, this method returns a <tt>DirContext</tt> containing
+     * Since JNDI 1.2, this method returns a {@code DirContext} containing
      * all of the named object's class definitions.
      *
      * @param name
      *          the name of the object whose object class
      *          definition is to be retrieved
-     * @return  the <tt>DirContext</tt> containing the named
+     * @return  the {@code DirContext} containing the named
      *          object's class definitions; never null
      *
      * @throws  OperationNotSupportedException if schema not supported
@@ -612,7 +612,7 @@
      * @param name
      *          the name of the object whose object class
      *          definition is to be retrieved
-     * @return  the <tt>DirContext</tt> containing the named
+     * @return  the {@code DirContext} containing the named
      *          object's class definitions; never null
      *
      * @throws  OperationNotSupportedException if schema not supported
@@ -656,7 +656,7 @@
      * substring comparison) use the version of the <code>search</code>
      * method that takes a filter argument.
      * <p>
-     * When changes are made to this <tt>DirContext</tt>,
+     * When changes are made to this {@code DirContext},
      * the effect on enumerations returned by prior calls to this method
      * is undefined.
      *<p>
@@ -681,8 +681,8 @@
      *          all attributes are to be returned;
      *          an empty array indicates that none are to be returned.
      * @return
-     *          a non-null enumeration of <tt>SearchResult</tt> objects.
-     *          Each <tt>SearchResult</tt> contains the attributes
+     *          a non-null enumeration of {@code SearchResult} objects.
+     *          Each {@code SearchResult} contains the attributes
      *          identified by <code>attributesToReturn</code>
      *          and the name of the corresponding object, named relative
      *          to the context named by <code>name</code>.
@@ -709,7 +709,7 @@
      *          the attributes to search for
      * @param attributesToReturn
      *          the attributes to return
-     * @return  a non-null enumeration of <tt>SearchResult</tt> objects
+     * @return  a non-null enumeration of {@code SearchResult} objects
      * @throws  NamingException if a naming exception is encountered
      */
     public NamingEnumeration<SearchResult>
@@ -723,7 +723,7 @@
      * specified set of attributes.
      * This method returns all the attributes of such objects.
      * It is equivalent to supplying null as
-     * the <tt>attributesToReturn</tt> parameter to the method
+     * the {@code attributesToReturn} parameter to the method
      * <code>search(Name, Attributes, String[])</code>.
      * <br>
      * See {@link #search(Name, Attributes, String[])} for a full description.
@@ -732,7 +732,7 @@
      *          the name of the context to search
      * @param matchingAttributes
      *          the attributes to search for
-     * @return  an enumeration of <tt>SearchResult</tt> objects
+     * @return  an enumeration of {@code SearchResult} objects
      * @throws  NamingException if a naming exception is encountered
      *
      * @see #search(Name, Attributes, String[])
@@ -750,7 +750,7 @@
      *          the name of the context to search
      * @param matchingAttributes
      *          the attributes to search for
-     * @return  an enumeration of <tt>SearchResult</tt> objects
+     * @return  an enumeration of {@code SearchResult} objects
      * @throws  NamingException if a naming exception is encountered
      */
     public NamingEnumeration<SearchResult>
@@ -807,8 +807,8 @@
      * attributes.  When an operator is not applicable, the exception
      * <code>InvalidSearchFilterException</code> is thrown.
      * <p>
-     * The result is returned in an enumeration of <tt>SearchResult</tt>s.
-     * Each <tt>SearchResult</tt> contains the name of the object
+     * The result is returned in an enumeration of {@code SearchResult}s.
+     * Each {@code SearchResult} contains the name of the object
      * and other information about the object (see SearchResult).
      * The name is either relative to the target context of the search
      * (which is named by the <code>name</code> parameter), or
@@ -817,8 +817,8 @@
      * <code>cons</code> specifies a search scope of
      * <code>SearchControls.OBJECT_SCOPE</code> or
      * <code>SearchControls.SUBSTREE_SCOPE</code>), its name is the empty
-     * string. The <tt>SearchResult</tt> may also contain attributes of the
-     * matching object if the <tt>cons</tt> argument specified that attributes
+     * string. The {@code SearchResult} may also contain attributes of the
+     * matching object if the {@code cons} argument specified that attributes
      * be returned.
      *<p>
      * If the object does not have a requested attribute, that
@@ -839,8 +839,8 @@
      * @param cons
      *          the search controls that control the search.  If null,
      *          the default search controls are used (equivalent
-     *          to <tt>(new SearchControls())</tt>).
-     * @return  an enumeration of <tt>SearchResult</tt>s of
+     *          to {@code (new SearchControls())}).
+     * @return  an enumeration of {@code SearchResult}s of
      *          the objects that satisfy the filter; never null
      *
      * @throws  InvalidSearchFilterException if the search filter specified is
@@ -872,9 +872,9 @@
      * @param cons
      *          the search controls that control the search.  If null,
      *          the default search controls are used (equivalent
-     *          to <tt>(new SearchControls())</tt>).
+     *          to {@code (new SearchControls())}).
      *
-     * @return  an enumeration of <tt>SearchResult</tt>s for
+     * @return  an enumeration of {@code SearchResult}s for
      *          the objects that satisfy the filter.
      * @throws  InvalidSearchFilterException if the search filter specified is
      *          not supported or understood by the underlying directory
@@ -935,8 +935,8 @@
      * <code>SearchControls.SUBSTREE_SCOPE</code>),
      * its name is the empty string.
      *<p>
-     * The <tt>SearchResult</tt> may also contain attributes of the matching
-     * object if the <tt>cons</tt> argument specifies that attributes be
+     * The {@code SearchResult} may also contain attributes of the matching
+     * object if the {@code cons} argument specifies that attributes be
      * returned.
      *<p>
      * If the object does not have a requested attribute, that
@@ -972,17 +972,17 @@
      * @param cons
      *          the search controls that control the search.  If null,
      *          the default search controls are used (equivalent
-     *          to <tt>(new SearchControls())</tt>).
-     * @return  an enumeration of <tt>SearchResult</tt>s of the objects
+     *          to {@code (new SearchControls())}).
+     * @return  an enumeration of {@code SearchResult}s of the objects
      *          that satisfy the filter; never null
      *
-     * @throws  ArrayIndexOutOfBoundsException if <tt>filterExpr</tt> contains
+     * @throws  ArrayIndexOutOfBoundsException if {@code filterExpr} contains
      *          <code>{i}</code> expressions where <code>i</code> is outside
      *          the bounds of the array <code>filterArgs</code>
-     * @throws  InvalidSearchControlsException if <tt>cons</tt> contains
+     * @throws  InvalidSearchControlsException if {@code cons} contains
      *          invalid settings
-     * @throws  InvalidSearchFilterException if <tt>filterExpr</tt> with
-     *          <tt>filterArgs</tt> represents an invalid search filter
+     * @throws  InvalidSearchFilterException if {@code filterExpr} with
+     *          {@code filterArgs} represents an invalid search filter
      * @throws  NamingException if a naming exception is encountered
      *
      * @see #search(Name, Attributes, String[])
@@ -1017,17 +1017,17 @@
      * @param cons
      *          the search controls that control the search.  If null,
      *          the default search controls are used (equivalent
-     *          to <tt>(new SearchControls())</tt>).
-     * @return  an enumeration of <tt>SearchResult</tt>s of the objects
+     *          to {@code (new SearchControls())}).
+     * @return  an enumeration of {@code SearchResult}s of the objects
      *          that satisfy the filter; never null
      *
-     * @throws  ArrayIndexOutOfBoundsException if <tt>filterExpr</tt> contains
+     * @throws  ArrayIndexOutOfBoundsException if {@code filterExpr} contains
      *          <code>{i}</code> expressions where <code>i</code> is outside
      *          the bounds of the array <code>filterArgs</code>
-     * @throws  InvalidSearchControlsException if <tt>cons</tt> contains
+     * @throws  InvalidSearchControlsException if {@code cons} contains
      *          invalid settings
-     * @throws  InvalidSearchFilterException if <tt>filterExpr</tt> with
-     *          <tt>filterArgs</tt> represents an invalid search filter
+     * @throws  InvalidSearchFilterException if {@code filterExpr} with
+     *          {@code filterArgs} represents an invalid search filter
      * @throws  NamingException if a naming exception is encountered
      */
     public NamingEnumeration<SearchResult>
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/InitialDirContext.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/InitialDirContext.java	Mon Aug 10 14:05:37 2015 +0300
@@ -49,14 +49,14 @@
      * Constructs an initial DirContext with the option of not
      * initializing it.  This may be used by a constructor in
      * a subclass when the value of the environment parameter
-     * is not yet known at the time the <tt>InitialDirContext</tt>
+     * is not yet known at the time the {@code InitialDirContext}
      * constructor is called.  The subclass's constructor will
      * call this constructor, compute the value of the environment,
-     * and then call <tt>init()</tt> before returning.
+     * and then call {@code init()} before returning.
      *
      * @param lazy
      *          true means do not initialize the initial DirContext; false
-     *          is equivalent to calling <tt>new InitialDirContext()</tt>
+     *          is equivalent to calling {@code new InitialDirContext()}
      * @throws  NamingException if a naming exception is encountered
      *
      * @see InitialContext#init(Hashtable)
@@ -69,7 +69,7 @@
     /**
      * Constructs an initial DirContext.
      * No environment properties are supplied.
-     * Equivalent to <tt>new InitialDirContext(null)</tt>.
+     * Equivalent to {@code new InitialDirContext(null)}.
      *
      * @throws  NamingException if a naming exception is encountered
      *
@@ -82,12 +82,12 @@
     /**
      * Constructs an initial DirContext using the supplied environment.
      * Environment properties are discussed in the
-     * <tt>javax.naming.InitialContext</tt> class description.
+     * {@code javax.naming.InitialContext} class description.
      *
-     * <p> This constructor will not modify <tt>environment</tt>
+     * <p> This constructor will not modify {@code environment}
      * or save a reference to it, but may save a clone.
      * Caller should not modify mutable keys and values in
-     * <tt>environment</tt> after it has been passed to the constructor.
+     * {@code environment} after it has been passed to the constructor.
      *
      * @param environment
      *          environment used to create the initial DirContext.
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/SearchControls.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/SearchControls.java	Mon Aug 10 14:05:37 2015 +0300
@@ -54,7 +54,7 @@
      * It contains zero element if the named object does not satisfy
      * the search filter specified in search().
      * <p>
-     * The value of this constant is <tt>0</tt>.
+     * The value of this constant is {@code 0}.
      */
     public final static int OBJECT_SCOPE = 0;
 
@@ -68,7 +68,7 @@
      * The names of elements in the NamingEnumeration are atomic names
      * relative to the named context.
      * <p>
-     * The value of this constant is <tt>1</tt>.
+     * The value of this constant is {@code 1}.
      */
     public final static int ONELEVEL_SCOPE = 1;
     /**
@@ -90,14 +90,14 @@
      * included in the enumeration with the empty string as
      * its name.
      * <p>
-     * The value of this constant is <tt>2</tt>.
+     * The value of this constant is {@code 2}.
      */
     public final static int SUBTREE_SCOPE = 2;
 
     /**
      * Contains the scope with which to apply the search. One of
-     * <tt>ONELEVEL_SCOPE</tt>, <tt>OBJECT_SCOPE</tt>, or
-     * <tt>SUBTREE_SCOPE</tt>.
+     * {@code ONELEVEL_SCOPE}, {@code OBJECT_SCOPE}, or
+     * {@code SUBTREE_SCOPE}.
      * @serial
      */
     private int searchScope;
@@ -117,7 +117,7 @@
     private boolean derefLink;
 
     /**
-     *  Indicates whether object is returned in <tt>SearchResult</tt>.
+     *  Indicates whether object is returned in {@code SearchResult}.
      * @serial
      */
     private boolean returnObj;
@@ -130,7 +130,7 @@
 
     /**
      *  Contains the list of attributes to be returned in
-     * <tt>SearchResult</tt> for each matching entry of search. <tt>null</tt>
+     * {@code SearchResult} for each matching entry of search. {@code null}
      * indicates that all attributes are to be returned.
      * @serial
      */
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/SearchResult.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/SearchResult.java	Mon Aug 10 14:05:37 2015 +0300
@@ -53,9 +53,9 @@
       * Constructs a search result using the result's name, its bound object, and
       * its attributes.
       *<p>
-      * <tt>getClassName()</tt> will return the class name of <tt>obj</tt>
-      * (or null if <tt>obj</tt> is null) unless the class name has been
-      * explicitly set using <tt>setClassName()</tt>.
+      * {@code getClassName()} will return the class name of {@code obj}
+      * (or null if {@code obj} is null) unless the class name has been
+      * explicitly set using {@code setClassName()}.
       *
       * @param name The non-null name of the search item. It is relative
       *             to the <em>target context</em> of the search (which is
@@ -76,9 +76,9 @@
       * Constructs a search result using the result's name, its bound object, and
       * its attributes, and whether the name is relative.
       *<p>
-      * <tt>getClassName()</tt> will return the class name of <tt>obj</tt>
-      * (or null if <tt>obj</tt> is null) unless the class name has been
-      * explicitly set using <tt>setClassName()</tt>
+      * {@code getClassName()} will return the class name of {@code obj}
+      * (or null if {@code obj} is null) unless the class name has been
+      * explicitly set using {@code setClassName()}
       *
       * @param name The non-null name of the search item.
       * @param obj  The object bound to name. Can be null.
@@ -106,9 +106,9 @@
       * named by the first parameter of the <code>search()</code> method)
       *
       * @param  className       The possibly null class name of the object
-      *         bound to <tt>name</tt>. If null, the class name of <tt>obj</tt> is
-      *         returned by <tt>getClassName()</tt>. If <tt>obj</tt> is also null,
-      *         <tt>getClassName()</tt> will return null.
+      *         bound to {@code name}. If null, the class name of {@code obj} is
+      *         returned by {@code getClassName()}. If {@code obj} is also null,
+      *         {@code getClassName()} will return null.
       * @param obj  The object bound to name. Can be null.
       * @param attrs The attributes that were requested to be returned with
       * this search item. Cannot be null.
@@ -127,9 +127,9 @@
       *
       * @param name The non-null name of the search item.
       * @param  className       The possibly null class name of the object
-      *         bound to <tt>name</tt>. If null, the class name of <tt>obj</tt> is
-      *         returned by <tt>getClassName()</tt>. If <tt>obj</tt> is also null,
-      *         <tt>getClassName()</tt> will return null.
+      *         bound to {@code name}. If null, the class name of {@code obj} is
+      *         returned by {@code getClassName()}. If {@code obj} is also null,
+      *         {@code getClassName()} will return null.
       * @param obj  The object bound to name. Can be null.
       * @param attrs The attributes that were requested to be returned with
       * this search item. Cannot be null.
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/package.html	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/package.html	Mon Aug 10 14:05:37 2015 +0300
@@ -28,7 +28,7 @@
 </head>
 <body bgcolor="white">
 
-Extends the <tt>javax.naming</tt> package to provide functionality
+Extends the <code>javax.naming</code> package to provide functionality
 for accessing directory services.
 
 <p>
@@ -47,20 +47,20 @@
 
 <h4>The Directory Context</h4>
 
-The <tt>DirContext</tt>
+The <code>DirContext</code>
 interface represents a <em>directory context</em>.
 It defines methods for examining and updating attributes associated with a
 <em>directory object</em>, or <em>directory entry</em> as it is sometimes
 called.
 <p>
-You use	<tt>getAttributes()</tt> to retrieve the attributes 
+You use	<code>getAttributes()</code> to retrieve the attributes
 associated with a directory object (for which you supply the name).
-Attributes are modified using <tt>modifyAttributes()</tt>. 
+Attributes are modified using <code>modifyAttributes()</code>.
 You can add, replace, or remove attributes and/or attribute values
 using this operation.
 <p>
-<tt>DirContext</tt> also behaves as a naming context
-by extending the <tt>Context</tt> interface in the <tt>javax.naming</tt> package.
+<code>DirContext</code> also behaves as a naming context
+by extending the <code>Context</code> interface in the <code>javax.naming</code> package.
 This means that any directory object can also provide
 a naming context. 
 For example, the directory object for a person might contain
@@ -69,13 +69,13 @@
 such as his printers and home directory.
 
 <h4>Searches</h4>
-<tt>DirContext</tt> contains methods for 
+<code>DirContext</code> contains methods for
 performing content-based searching of the directory.
 In the simplest and most common form of usage, the application
-specifies a set of attributes--possibly with specific 
-values--to match, and submits this attribute set, to the 
-<tt>search()</tt> method.
-There are other overloaded forms of <tt>search()</tt>
+specifies a set of attributes--possibly with specific
+values--to match, and submits this attribute set, to the
+<code>search()</code> method.
+There are other overloaded forms of <code>search()</code>
 that support more sophisticated <em>search filters</em>.
 
 
--- a/jdk/src/java.naming/share/classes/javax/naming/event/EventContext.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/EventContext.java	Mon Aug 10 14:05:37 2015 +0300
@@ -35,7 +35,7 @@
  * events fired when objects named in a context changes.
  *
  *<h1>Target</h1>
- * The name parameter in the <tt>addNamingListener()</tt> methods is referred
+ * The name parameter in the {@code addNamingListener()} methods is referred
  * to as the <em>target</em>. The target, along with the scope, identify
  * the object(s) that the listener is interested in.
  * It is possible to register interest in a target that does not exist, but
@@ -44,23 +44,23 @@
  *<p>
  * If a service only supports registration for existing
  * targets, an attempt to register for a nonexistent target
- * results in a <tt>NameNotFoundException</tt> being thrown as early as possible,
- * preferably at the time <tt>addNamingListener()</tt> is called, or if that is
+ * results in a {@code NameNotFoundException} being thrown as early as possible,
+ * preferably at the time {@code addNamingListener()} is called, or if that is
  * not possible, the listener will receive the exception through the
- * <tt>NamingExceptionEvent</tt>.
+ * {@code NamingExceptionEvent}.
  *<p>
  * Also, for service providers that only support registration for existing
  * targets, when the target that a listener has registered for is
  * subsequently removed from the namespace, the listener is notified
- * via a <tt>NamingExceptionEvent</tt> (containing a
- *<tt>NameNotFoundException</tt>).
+ * via a {@code NamingExceptionEvent} (containing a
+ *{@code NameNotFoundException}).
  *<p>
- * An application can use the method <tt>targetMustExist()</tt> to check
- * whether a <tt>EventContext</tt> supports registration
+ * An application can use the method {@code targetMustExist()} to check
+ * whether a {@code EventContext} supports registration
  * of nonexistent targets.
  *
  *<h1>Event Source</h1>
- * The <tt>EventContext</tt> instance on which you invoke the
+ * The {@code EventContext} instance on which you invoke the
  * registration methods is the <em>event source</em> of the events that are
  * (potentially) generated.
  * The source is <em>not necessarily</em> the object named by the target.
@@ -69,7 +69,7 @@
  * In other words, the target,
  * along with the scope parameter, are used to identify
  * the object(s) that the listener is interested in, but the event source
- * is the <tt>EventContext</tt> instance with which the listener
+ * is the {@code EventContext} instance with which the listener
  * has registered.
  *<p>
  * For example, suppose a listener makes the following registration:
@@ -78,52 +78,52 @@
  *      src.addNamingListener("x", SUBTREE_SCOPE, listener);
  *</pre></blockquote>
  * When an object named "x/y" is subsequently deleted, the corresponding
- * <tt>NamingEvent</tt> (<tt>evt</tt>)  must contain:
+ * {@code NamingEvent} ({@code evt})  must contain:
  *<blockquote><pre>
  *      evt.getEventContext() == src
  *      evt.getOldBinding().getName().equals("x/y")
  *</pre></blockquote>
  *<p>
  * Furthermore, listener registration/deregistration is with
- * the <tt>EventContext</tt>
+ * the {@code EventContext}
  * <em>instance</em>, and not with the corresponding object in the namespace.
  * If the program intends at some point to remove a listener, then it needs to
- * keep a reference to the <tt>EventContext</tt> instance on
- * which it invoked <tt>addNamingListener()</tt> (just as
+ * keep a reference to the {@code EventContext} instance on
+ * which it invoked {@code addNamingListener()} (just as
  * it needs to keep a reference to the listener in order to remove it
- * later). It cannot expect to do a <tt>lookup()</tt> and get another instance of
- * a <tt>EventContext</tt> on which to perform the deregistration.
+ * later). It cannot expect to do a {@code lookup()} and get another instance of
+ * a {@code EventContext} on which to perform the deregistration.
  *<h1>Lifetime of Registration</h1>
  * A registered listener becomes deregistered when:
  *<ul>
- *<li>It is removed using <tt>removeNamingListener()</tt>.
+ *<li>It is removed using {@code removeNamingListener()}.
  *<li>An exception is thrown while collecting information about the events.
- *  That is, when the listener receives a <tt>NamingExceptionEvent</tt>.
- *<li><tt>Context.close()</tt> is invoked on the <tt>EventContext</tt>
+ *  That is, when the listener receives a {@code NamingExceptionEvent}.
+ *<li>{@code Context.close()} is invoked on the {@code EventContext}
  * instance with which it has registered.
  </ul>
- * Until that point, a <tt>EventContext</tt> instance that has outstanding
+ * Until that point, a {@code EventContext} instance that has outstanding
  * listeners will continue to exist and be maintained by the service provider.
  *
  *<h1>Listener Implementations</h1>
  * The registration/deregistration methods accept an instance of
- * <tt>NamingListener</tt>. There are subinterfaces of <tt>NamingListener</tt>
- * for different of event types of <tt>NamingEvent</tt>.
- * For example, the <tt>ObjectChangeListener</tt>
- * interface is for the <tt>NamingEvent.OBJECT_CHANGED</tt> event type.
+ * {@code NamingListener}. There are subinterfaces of {@code NamingListener}
+ * for different of event types of {@code NamingEvent}.
+ * For example, the {@code ObjectChangeListener}
+ * interface is for the {@code NamingEvent.OBJECT_CHANGED} event type.
  * To register interest in multiple event types, the listener implementation
- * should implement multiple <tt>NamingListener</tt> subinterfaces and use a
- * single invocation of <tt>addNamingListener()</tt>.
+ * should implement multiple {@code NamingListener} subinterfaces and use a
+ * single invocation of {@code addNamingListener()}.
  * In addition to reducing the number of method calls and possibly the code size
  * of the listeners, this allows some service providers to optimize the
  * registration.
  *
  *<h1>Threading Issues</h1>
  *
- * Like <tt>Context</tt> instances in general, instances of
- * <tt>EventContext</tt> are not guaranteed to be thread-safe.
+ * Like {@code Context} instances in general, instances of
+ * {@code EventContext} are not guaranteed to be thread-safe.
  * Care must be taken when multiple threads are accessing the same
- * <tt>EventContext</tt> concurrently.
+ * {@code EventContext} concurrently.
  * See the
  * <a href=package-summary.html#THREADING>package description</a>
  * for more information on threading issues.
@@ -138,7 +138,7 @@
      * Constant for expressing interest in events concerning the object named
      * by the target.
      *<p>
-     * The value of this constant is <tt>0</tt>.
+     * The value of this constant is {@code 0}.
      */
     public final static int OBJECT_SCOPE = 0;
 
@@ -147,7 +147,7 @@
      * in the context named by the target,
      * excluding the context named by the target.
      *<p>
-     * The value of this constant is <tt>1</tt>.
+     * The value of this constant is {@code 1}.
      */
     public final static int ONELEVEL_SCOPE = 1;
 
@@ -156,7 +156,7 @@
      * in the subtree of the object named by the target, including the object
      * named by the target.
      *<p>
-     * The value of this constant is <tt>2</tt>.
+     * The value of this constant is {@code 2}.
      */
     public final static int SUBTREE_SCOPE = 2;
 
@@ -167,31 +167,31 @@
      *
      * The event source of those events is this context. See the
      * class description for a discussion on event source and target.
-     * See the descriptions of the constants <tt>OBJECT_SCOPE</tt>,
-     * <tt>ONELEVEL_SCOPE</tt>, and <tt>SUBTREE_SCOPE</tt> to see how
-     * <tt>scope</tt> affects the registration.
+     * See the descriptions of the constants {@code OBJECT_SCOPE},
+     * {@code ONELEVEL_SCOPE}, and {@code SUBTREE_SCOPE} to see how
+     * {@code scope} affects the registration.
      *<p>
-     * <tt>target</tt> needs to name a context only when <tt>scope</tt> is
-     * <tt>ONELEVEL_SCOPE</tt>.
-     * <tt>target</tt> may name a non-context if <tt>scope</tt> is either
-     * <tt>OBJECT_SCOPE</tt> or <tt>SUBTREE_SCOPE</tt>.  Using
-     * <tt>SUBTREE_SCOPE</tt> for a non-context might be useful,
-     * for example, if the caller does not know in advance whether <tt>target</tt>
+     * {@code target} needs to name a context only when {@code scope} is
+     * {@code ONELEVEL_SCOPE}.
+     * {@code target} may name a non-context if {@code scope} is either
+     * {@code OBJECT_SCOPE} or {@code SUBTREE_SCOPE}.  Using
+     * {@code SUBTREE_SCOPE} for a non-context might be useful,
+     * for example, if the caller does not know in advance whether {@code target}
      * is a context and just wants to register interest in the (possibly
-     * degenerate subtree) rooted at <tt>target</tt>.
+     * degenerate subtree) rooted at {@code target}.
      *<p>
      * When the listener is notified of an event, the listener may
      * in invoked in a thread other than the one in which
-     * <tt>addNamingListener()</tt> is executed.
+     * {@code addNamingListener()} is executed.
      * Care must be taken when multiple threads are accessing the same
-     * <tt>EventContext</tt> concurrently.
+     * {@code EventContext} concurrently.
      * See the
      * <a href=package-summary.html#THREADING>package description</a>
      * for more information on threading issues.
      *
      * @param target A nonnull name to be resolved relative to this context.
-     * @param scope One of <tt>OBJECT_SCOPE</tt>, <tt>ONELEVEL_SCOPE</tt>, or
-     * <tt>SUBTREE_SCOPE</tt>.
+     * @param scope One of {@code OBJECT_SCOPE}, {@code ONELEVEL_SCOPE}, or
+     * {@code SUBTREE_SCOPE}.
      * @param l  The nonnull listener.
      * @exception NamingException If a problem was encountered while
      * adding the listener.
@@ -204,12 +204,12 @@
      * Adds a listener for receiving naming events fired
      * when the object named by the string target name and scope changes.
      *
-     * See the overload that accepts a <tt>Name</tt> for details.
+     * See the overload that accepts a {@code Name} for details.
      *
      * @param target The nonnull string name of the object resolved relative
      * to this context.
-     * @param scope One of <tt>OBJECT_SCOPE</tt>, <tt>ONELEVEL_SCOPE</tt>, or
-     * <tt>SUBTREE_SCOPE</tt>.
+     * @param scope One of {@code OBJECT_SCOPE}, {@code ONELEVEL_SCOPE}, or
+     * {@code SUBTREE_SCOPE}.
      * @param l  The nonnull listener.
      * @exception NamingException If a problem was encountered while
      * adding the listener.
@@ -220,15 +220,15 @@
 
     /**
      * Removes a listener from receiving naming events fired
-     * by this <tt>EventContext</tt>.
+     * by this {@code EventContext}.
      * The listener may have registered more than once with this
-     * <tt>EventContext</tt>, perhaps with different target/scope arguments.
+     * {@code EventContext}, perhaps with different target/scope arguments.
      * After this method is invoked, the listener will no longer
-     * receive events with this <tt>EventContext</tt> instance
+     * receive events with this {@code EventContext} instance
      * as the event source (except for those events already in the process of
      * being dispatched).
      * If the listener was not, or is no longer, registered with
-     * this <tt>EventContext</tt> instance, this method does not do anything.
+     * this {@code EventContext} instance, this method does not do anything.
      *
      * @param l  The nonnull listener.
      * @exception NamingException If a problem was encountered while
--- a/jdk/src/java.naming/share/classes/javax/naming/event/EventDirContext.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/EventDirContext.java	Mon Aug 10 14:05:37 2015 +0300
@@ -42,17 +42,17 @@
  * satisfy the filter.  However, there might be limitations in the extent
  * to which this can be supported by the service provider and underlying
  * protocol/service.  If the caller submits a filter that cannot be
- * supported in this way, <tt>addNamingListener()</tt> throws an
- * <tt>InvalidSearchFilterException</tt>.
+ * supported in this way, {@code addNamingListener()} throws an
+ * {@code InvalidSearchFilterException}.
  *<p>
- * See <tt>EventContext</tt> for a description of event source
+ * See {@code EventContext} for a description of event source
  * and target, and information about listener registration/deregistration
  * that are also applicable to methods in this interface.
  * See the
  * <a href=package-summary.html#THREADING>package description</a>
  * for information on threading issues.
  *<p>
- * A <tt>SearchControls</tt> or array object
+ * A {@code SearchControls} or array object
  * passed as a parameter to any method is owned by the caller.
  * The service provider will not modify the object or keep a reference to it.
  *
@@ -64,15 +64,15 @@
 public interface EventDirContext extends EventContext, DirContext {
     /**
      * Adds a listener for receiving naming events fired
-     * when objects identified by the search filter <tt>filter</tt> at
+     * when objects identified by the search filter {@code filter} at
      * the object named by target are modified.
      * <p>
      * The scope, returningObj flag, and returningAttributes flag from
-     * the search controls <tt>ctls</tt> are used to control the selection
+     * the search controls {@code ctls} are used to control the selection
      * of objects that the listener is interested in,
      * and determines what information is returned in the eventual
-     * <tt>NamingEvent</tt> object. Note that the requested
-     * information to be returned might not be present in the <tt>NamingEvent</tt>
+     * {@code NamingEvent} object. Note that the requested
+     * information to be returned might not be present in the {@code NamingEvent}
      * object if they are unavailable or could not be obtained by the
      * service provider or service.
      *
@@ -91,9 +91,9 @@
 
     /**
      * Adds a listener for receiving naming events fired when
-     * objects identified by the search filter <tt>filter</tt> at the
+     * objects identified by the search filter {@code filter} at the
      * object named by the string target name are modified.
-     * See the overload that accepts a <tt>Name</tt> for details of
+     * See the overload that accepts a {@code Name} for details of
      * how this method behaves.
      *
      * @param target The nonnull string name of the object resolved relative to this context.
@@ -111,14 +111,14 @@
 
     /**
      * Adds a listener for receiving naming events fired
-     * when objects identified by the search filter <tt>filter</tt> and
+     * when objects identified by the search filter {@code filter} and
      * filter arguments at the object named by the target are modified.
      * The scope, returningObj flag, and returningAttributes flag from
-     * the search controls <tt>ctls</tt> are used to control the selection
+     * the search controls {@code ctls} are used to control the selection
      * of objects that the listener is interested in,
      * and determines what information is returned in the eventual
-     * <tt>NamingEvent</tt> object.  Note that the requested
-     * information to be returned might not be present in the <tt>NamingEvent</tt>
+     * {@code NamingEvent} object.  Note that the requested
+     * information to be returned might not be present in the {@code NamingEvent}
      * object if they are unavailable or could not be obtained by the
      * service provider or service.
      *
@@ -138,10 +138,10 @@
 
     /**
      * Adds a listener for receiving naming events fired when
-     * objects identified by the search filter <tt>filter</tt>
+     * objects identified by the search filter {@code filter}
      * and filter arguments at the
      * object named by the string target name are modified.
-     * See the overload that accepts a <tt>Name</tt> for details of
+     * See the overload that accepts a {@code Name} for details of
      * how this method behaves.
      *
      * @param target The nonnull string name of the object resolved relative to this context.
--- a/jdk/src/java.naming/share/classes/javax/naming/event/NamespaceChangeListener.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/NamespaceChangeListener.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,21 +28,21 @@
 /**
   * Specifies the methods that a listener interested in namespace changes
   * must implement.
-  * Specifically, the listener is interested in <tt>NamingEvent</tt>s
-  * with event types of <tt>OBJECT_ADDED</TT>, <TT>OBJECT_RENAMED</TT>, or
-  * <TT>OBJECT_REMOVED</TT>.
+  * Specifically, the listener is interested in {@code NamingEvent}s
+  * with event types of {@code OBJECT_ADDED, OBJECT_RENAMED}, or
+  * {@code OBJECT_REMOVED}.
   *<p>
   * Such a listener must:
   *<ol>
   *<li>Implement this interface and its methods.
-  *<li>Implement <tt>NamingListener.namingExceptionThrown()</tt> so that
+  *<li>Implement {@code NamingListener.namingExceptionThrown()} so that
   * it will be notified of exceptions thrown while attempting to
   * collect information about the events.
-  *<li>Register with the source using the source's <tt>addNamingListener()</tt>
+  *<li>Register with the source using the source's {@code addNamingListener()}
   *    method.
   *</ol>
-  * A listener that wants to be notified of <tt>OBJECT_CHANGED</tt> event types
-  * should also implement the <tt>ObjectChangeListener</tt>
+  * A listener that wants to be notified of {@code OBJECT_CHANGED} event types
+  * should also implement the {@code ObjectChangeListener}
   * interface.
   *
   * @author Rosanna Lee
@@ -60,7 +60,7 @@
      * Called when an object has been added.
      *<p>
      * The binding of the newly added object can be obtained using
-     * <tt>evt.getNewBinding()</tt>.
+     * {@code evt.getNewBinding()}.
      * @param evt The nonnull event.
      * @see NamingEvent#OBJECT_ADDED
      */
@@ -70,7 +70,7 @@
      * Called when an object has been removed.
      *<p>
      * The binding of the newly removed object can be obtained using
-     * <tt>evt.getOldBinding()</tt>.
+     * {@code evt.getOldBinding()}.
      * @param evt The nonnull event.
      * @see NamingEvent#OBJECT_REMOVED
      */
@@ -80,8 +80,8 @@
      * Called when an object has been renamed.
      *<p>
      * The binding of the renamed object can be obtained using
-     * <tt>evt.getNewBinding()</tt>. Its old binding (before the rename)
-     * can be obtained using <tt>evt.getOldBinding()</tt>.
+     * {@code evt.getNewBinding()}. Its old binding (before the rename)
+     * can be obtained using {@code evt.getOldBinding()}.
      * One of these may be null if the old/new binding was outside the
      * scope in which the listener has registered interest.
      * @param evt The nonnull event.
--- a/jdk/src/java.naming/share/classes/javax/naming/event/NamingEvent.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/NamingEvent.java	Mon Aug 10 14:05:37 2015 +0300
@@ -30,9 +30,9 @@
 /**
   * This class represents an event fired by a naming/directory service.
   *<p>
-  * The <tt>NamingEvent</tt>'s state consists of
+  * The {@code NamingEvent}'s state consists of
   * <ul>
-  * <li>The event source: the <tt>EventContext</tt> which fired this event.
+  * <li>The event source: the {@code EventContext} which fired this event.
   * <li>The event type.
   * <li>The new binding: information about the object after the change.
   * <li>The old binding: information about the object before the change.
@@ -41,24 +41,24 @@
   * information.
   * </ul>
   * <p>
-  * Note that the event source is always the same <tt>EventContext</tt>
+  * Note that the event source is always the same {@code EventContext}
   * <em>instance</em>  that the listener has registered with.
   * Furthermore, the names of the bindings in
-  * the <tt>NamingEvent</tt> are always relative to that instance.
+  * the {@code NamingEvent} are always relative to that instance.
   * For example, suppose a listener makes the following registration:
   *<blockquote><pre>
   *     NamespaceChangeListener listener = ...;
   *     src.addNamingListener("x", SUBTREE_SCOPE, listener);
   *</pre></blockquote>
   * When an object named "x/y" is subsequently deleted, the corresponding
-  * <tt>NamingEvent</tt> (<tt>evt</tt>) must contain:
+  * {@code NamingEvent} ({@code evt}) must contain:
   *<blockquote><pre>
   *     evt.getEventContext() == src
   *     evt.getOldBinding().getName().equals("x/y")
   *</pre></blockquote>
   *
   * Care must be taken when multiple threads are accessing the same
-  * <tt>EventContext</tt> concurrently.
+  * {@code EventContext} concurrently.
   * See the
   * <a href=package-summary.html#THREADING>package description</a>
   * for more information on threading issues.
@@ -73,13 +73,13 @@
 public class NamingEvent extends java.util.EventObject {
     /**
      * Naming event type for indicating that a new object has been added.
-     * The value of this constant is <tt>0</tt>.
+     * The value of this constant is {@code 0}.
      */
     public static final int OBJECT_ADDED = 0;
 
     /**
      * Naming event type for indicating that an object has been removed.
-     * The value of this constant is <tt>1</tt>.
+     * The value of this constant is {@code 1}.
      */
     public static final int OBJECT_REMOVED = 1;
 
@@ -90,7 +90,7 @@
      * be implemented by adding a binding with the new name and removing
      * the old binding.
      *<p>
-     * The old/new binding in <tt>NamingEvent</tt> may be null if the old
+     * The old/new binding in {@code NamingEvent} may be null if the old
      * name or new name is outside of the scope for which the listener
      * has registered.
      *<p>
@@ -102,7 +102,7 @@
      * corresponding provider might not be able to prevent those
      * notifications from being propagated to the listeners.
      *<p>
-     * The value of this constant is <tt>2</tt>.
+     * The value of this constant is {@code 2}.
      */
     public static final int OBJECT_RENAMED = 2;
 
@@ -114,7 +114,7 @@
      * be implemented by first removing the old binding and adding
      * a new binding containing the same name but a different object.
      *<p>
-     * The value of this constant is <tt>3</tt>.
+     * The value of this constant is {@code 3}.
      */
     public static final int OBJECT_CHANGED = 3;
 
@@ -147,16 +147,16 @@
     protected Binding newBinding;
 
     /**
-     * Constructs an instance of <tt>NamingEvent</tt>.
+     * Constructs an instance of {@code NamingEvent}.
      *<p>
-     * The names in <tt>newBd</tt> and <tt>oldBd</tt> are to be resolved relative
-     * to the event source <tt>source</tt>.
+     * The names in {@code newBd} and {@code oldBd} are to be resolved relative
+     * to the event source {@code source}.
      *
-     * For an <tt>OBJECT_ADDED</tt> event type, <tt>newBd</tt> must not be null.
-     * For an <tt>OBJECT_REMOVED</tt> event type, <tt>oldBd</tt> must not be null.
-     * For an <tt>OBJECT_CHANGED</tt> event type,  <tt>newBd</tt> and
-     * <tt>oldBd</tt> must not be null. For  an <tt>OBJECT_RENAMED</tt> event type,
-     * one of <tt>newBd</tt> or <tt>oldBd</tt> may be null if the new or old
+     * For an {@code OBJECT_ADDED} event type, {@code newBd} must not be null.
+     * For an {@code OBJECT_REMOVED} event type, {@code oldBd} must not be null.
+     * For an {@code OBJECT_CHANGED} event type,  {@code newBd} and
+     * {@code oldBd} must not be null. For  an {@code OBJECT_RENAMED} event type,
+     * one of {@code newBd} or {@code oldBd} may be null if the new or old
      * binding is outside of the scope for which the listener has registered.
      *
      * @param source The non-null context that fired this event.
@@ -192,13 +192,13 @@
 
     /**
      * Retrieves the event source that fired this event.
-     * This returns the same object as <tt>EventObject.getSource()</tt>.
+     * This returns the same object as {@code EventObject.getSource()}.
      *<p>
      * If the result of this method is used to access the
      * event source, for example, to look up the object or get its attributes,
-     * then it needs to be locked  because implementations of <tt>Context</tt>
+     * then it needs to be locked  because implementations of {@code Context}
      * are not guaranteed to be thread-safe
-     * (and <tt>EventContext</tt> is a subinterface of <tt>Context</tt>).
+     * (and {@code EventContext} is a subinterface of {@code Context}).
      * See the
      * <a href=package-summary.html#THREADING>package description</a>
      * for more information on threading issues.
@@ -213,16 +213,16 @@
      * Retrieves the binding of the object before the change.
      *<p>
      * The binding must be nonnull if the object existed before the change
-     * relative to the source context (<tt>getEventContext()</tt>).
-     * That is, it must be nonnull for <tt>OBJECT_REMOVED</tt> and
-     * <tt>OBJECT_CHANGED</tt>.
-     * For <tt>OBJECT_RENAMED</tt>, it is null if the object before the rename
+     * relative to the source context ({@code getEventContext()}).
+     * That is, it must be nonnull for {@code OBJECT_REMOVED} and
+     * {@code OBJECT_CHANGED}.
+     * For {@code OBJECT_RENAMED}, it is null if the object before the rename
      * is outside of the scope for which the listener has registered interest;
      * it is nonnull if the object is inside the scope before the rename.
      *<p>
      * The name in the binding is to be resolved relative
-     * to the event source <tt>getEventContext()</tt>.
-     * The object returned by <tt>Binding.getObject()</tt> may be null if
+     * to the event source {@code getEventContext()}.
+     * The object returned by {@code Binding.getObject()} may be null if
      * such information is unavailable.
      *
      * @return The possibly null binding of the object before the change.
@@ -235,16 +235,16 @@
      * Retrieves the binding of the object after the change.
      *<p>
      * The binding must be nonnull if the object existed after the change
-     * relative to the source context (<tt>getEventContext()</tt>).
-     * That is, it must be nonnull for <tt>OBJECT_ADDED</tt> and
-     * <tt>OBJECT_CHANGED</tt>. For <tt>OBJECT_RENAMED</tt>,
+     * relative to the source context ({@code getEventContext()}).
+     * That is, it must be nonnull for {@code OBJECT_ADDED} and
+     * {@code OBJECT_CHANGED}. For {@code OBJECT_RENAMED},
      * it is null if the object after the rename is outside the scope for
      * which the listener registered interest; it is nonnull if the object
      * is inside the scope after the rename.
      *<p>
      * The name in the binding is to be resolved relative
-     * to the event source <tt>getEventContext()</tt>.
-     * The object returned by <tt>Binding.getObject()</tt> may be null if
+     * to the event source {@code getEventContext()}.
+     * The object returned by {@code Binding.getObject()} may be null if
      * such information is unavailable.
      *
      * @return The possibly null binding of the object after the change.
@@ -268,8 +268,8 @@
      * Invokes the appropriate listener method on this event.
      * The default implementation of
      * this method handles the following event types:
-     * <tt>OBJECT_ADDED</TT>, <TT>OBJECT_REMOVED</TT>,
-     * <TT>OBJECT_RENAMED</TT>, <TT>OBJECT_CHANGED</TT>.
+     * {@code OBJECT_ADDED, OBJECT_REMOVED,
+     * OBJECT_RENAMED, OBJECT_CHANGED}.
      *<p>
      * The listener method is executed in the same thread
      * as this method.  See the
--- a/jdk/src/java.naming/share/classes/javax/naming/event/NamingExceptionEvent.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/NamingExceptionEvent.java	Mon Aug 10 14:05:37 2015 +0300
@@ -30,9 +30,9 @@
 /**
   * This class represents an event fired when the procedures/processes
   * used to collect information for notifying listeners of
-  * <tt>NamingEvent</tt>s threw a <tt>NamingException</tt>.
+  * {@code NamingEvent}s threw a {@code NamingException}.
   * This can happen, for example, if the server which the listener is using
-  * aborts subsequent to the <tt>addNamingListener()</tt> call.
+  * aborts subsequent to the {@code addNamingListener()} call.
   *
   * @author Rosanna Lee
   * @author Scott Seligman
@@ -50,12 +50,12 @@
     private NamingException exception;
 
     /**
-     * Constructs an instance of <tt>NamingExceptionEvent</tt> using
-     * the context in which the <tt>NamingException</tt> was thrown and the exception
+     * Constructs an instance of {@code NamingExceptionEvent} using
+     * the context in which the {@code NamingException} was thrown and the exception
      * that was thrown.
      *
      * @param source The non-null context in which the exception was thrown.
-     * @param exc    The non-null <tt>NamingException</tt> that was thrown.
+     * @param exc    The non-null {@code NamingException} that was thrown.
      *
      */
     public NamingExceptionEvent(EventContext source, NamingException exc) {
@@ -72,16 +72,16 @@
     }
 
     /**
-     * Retrieves the <tt>EventContext</tt> that fired this event.
-     * This returns the same object as <tt>EventObject.getSource()</tt>.
-     * @return The non-null <tt>EventContext</tt> that fired this event.
+     * Retrieves the {@code EventContext} that fired this event.
+     * This returns the same object as {@code EventObject.getSource()}.
+     * @return The non-null {@code EventContext} that fired this event.
      */
     public EventContext getEventContext() {
         return (EventContext)getSource();
     }
 
     /**
-     * Invokes the <tt>namingExceptionThrown()</tt> method on
+     * Invokes the {@code namingExceptionThrown()} method on
      * a listener using this event.
      * @param listener The non-null naming listener on which to invoke
      * the method.
--- a/jdk/src/java.naming/share/classes/javax/naming/event/NamingListener.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/NamingListener.java	Mon Aug 10 14:05:37 2015 +0300
@@ -27,22 +27,22 @@
 
 /**
   * This interface is the root of listener interfaces that
-  * handle <tt>NamingEvent</tt>s.
+  * handle {@code NamingEvent}s.
   * It does not make sense for a listener to implement just this interface.
-  * A listener typically implements a subinterface of <tt>NamingListener</tt>,
-  * such as <tt>ObjectChangeListener</tt> or <tt>NamespaceChangeListener</tt>.
+  * A listener typically implements a subinterface of {@code NamingListener},
+  * such as {@code ObjectChangeListener} or {@code NamespaceChangeListener}.
   *<p>
-  * This interface contains a single method, <tt>namingExceptionThrown()</tt>,
+  * This interface contains a single method, {@code namingExceptionThrown()},
   * that must be implemented so that the listener can be notified of
   * exceptions that are thrown (by the service provider) while gathering
   * information about the events that they're interested in.
   * When this method is invoked, the listener has been automatically deregistered
-  * from the <tt>EventContext</tt> with which it has registered.
+  * from the {@code EventContext} with which it has registered.
   *<p>
-  * For example, suppose a listener implements <tt>ObjectChangeListener</tt> and
-  * registers with a <tt>EventContext</tt>.
+  * For example, suppose a listener implements {@code ObjectChangeListener} and
+  * registers with a {@code EventContext}.
   * Then, if the connection to the server is subsequently broken,
-  * the listener will receive a <tt>NamingExceptionEvent</tt> and may
+  * the listener will receive a {@code NamingExceptionEvent} and may
   * take some corrective action, such as notifying the user of the application.
   *
   * @author Rosanna Lee
@@ -57,7 +57,7 @@
 public interface NamingListener extends java.util.EventListener {
     /**
      * Called when a naming exception is thrown while attempting
-     * to fire a <tt>NamingEvent</tt>.
+     * to fire a {@code NamingEvent}.
      *
      * @param evt The nonnull event.
      */
--- a/jdk/src/java.naming/share/classes/javax/naming/event/ObjectChangeListener.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/ObjectChangeListener.java	Mon Aug 10 14:05:37 2015 +0300
@@ -26,27 +26,27 @@
 package javax.naming.event;
 
 /**
-  * Specifies the method that a listener of a <tt>NamingEvent</tt>
-  * with event type of <tt>OBJECT_CHANGED</tt> must implement.
+  * Specifies the method that a listener of a {@code NamingEvent}
+  * with event type of {@code OBJECT_CHANGED} must implement.
   *<p>
-  * An <tt>OBJECT_CHANGED</tt> event type is fired when (the contents of)
+  * An {@code OBJECT_CHANGED} event type is fired when (the contents of)
   * an object has changed. This might mean that its attributes have been modified,
   * added, or removed, and/or that the object itself has been replaced.
   * How the object has changed can be determined by examining the
-  * <tt>NamingEvent</tt>'s old and new bindings.
+  * {@code NamingEvent}'s old and new bindings.
   *<p>
-  * A listener interested in <tt>OBJECT_CHANGED</tt> event types must:
+  * A listener interested in {@code OBJECT_CHANGED} event types must:
   *<ol>
   *
-  *<li>Implement this interface and its method (<tt>objectChanged()</tt>)
-  *<li>Implement <tt>NamingListener.namingExceptionThrown()</tt> so that
+  *<li>Implement this interface and its method ({@code objectChanged()})
+  *<li>Implement {@code NamingListener.namingExceptionThrown()} so that
   * it will be notified of exceptions thrown while attempting to
   * collect information about the events.
-  *<li>Register with the source using the source's <tt>addNamingListener()</tt>
+  *<li>Register with the source using the source's {@code addNamingListener()}
   *    method.
   *</ol>
   * A listener that wants to be notified of namespace change events
-  * should also implement the <tt>NamespaceChangeListener</tt>
+  * should also implement the {@code NamespaceChangeListener}
   * interface.
   *
   * @author Rosanna Lee
@@ -64,8 +64,8 @@
      * Called when an object has been changed.
      *<p>
      * The binding of the changed object can be obtained using
-     * <tt>evt.getNewBinding()</tt>. Its old binding (before the change)
-     * can be obtained using <tt>evt.getOldBinding()</tt>.
+     * {@code evt.getNewBinding()}. Its old binding (before the change)
+     * can be obtained using {@code evt.getOldBinding()}.
      * @param evt The nonnull naming event.
      * @see NamingEvent#OBJECT_CHANGED
      */
--- a/jdk/src/java.naming/share/classes/javax/naming/event/package.html	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/package.html	Mon Aug 10 14:05:37 2015 +0300
@@ -42,21 +42,21 @@
 
 <h4>Naming Events</h4>
 <p>
-This package defines a <tt>NamingEvent</tt> class to represent an event
+This package defines a <code>NamingEvent</code> class to represent an event
 that is generated by a naming/directory service.
-It also defines subinterfaces of <tt>Context</tt> and <tt>DirContext</tt>,
-called <tt>EventContext</tt> and <tt>EventDirContext</tt>,
+It also defines subinterfaces of <code>Context</code> and <code>DirContext</code>,
+called <code>EventContext</code> and <code>EventDirContext</code>,
 through which applications can register their interest in events
 fired by the context.
 <p>
-<tt>NamingEvent</tt> represents an event that occurs in a 
+<code>NamingEvent</code> represents an event that occurs in a 
 naming or directory service. There are two categories of naming events:
 <ul>
 <li>Those that affect the namespace (add/remove/rename an object)
 <li>Those that affect the objects' contents.
 </ul>
 Each category of events is handled by a corresponding listener:
-<tt>NamespaceChangeListener</tt>, <tt>ObjectChangeListener</tt>.
+<code>NamespaceChangeListener</code>, <code>ObjectChangeListener</code>.
 <p>
 An application, for example, can register its interest in changes to
 objects in a context as follows:
@@ -82,19 +82,19 @@
 <h4>Threading Issues</h4>
 
 When an event is dispatched to a listener, the listener method (such
-as <tt>objectChanged()</tt>) may be executed in a thread other than the
-one in which the call to <tt>addNamingListener()</tt> was executed.
+as <code>objectChanged()</code>) may be executed in a thread other than the
+one in which the call to <code>addNamingListener()</code> was executed.
 The choice of which thread to use is made by the service provider.
 When an event is dispatched to multiple listeners, the service provider
 may choose (and is generally encouraged) to execute the listener methods
 concurrently in separate threads.
 <p>
-When a listener instance invokes <tt>NamingEvent.getEventContext()</tt>,
+When a listener instance invokes <code>NamingEvent.getEventContext()</code>,
 it must take into account the possibility that other threads will be
 working with that context concurrently.  Likewise, when a listener is
-registered via <tt>addNamingListener()</tt>, the registering thread
+registered via <code>addNamingListener()</code>, the registering thread
 must take into account the likely possibility that the service provider
-will later invoke the listeners in newly-created threads.  As <tt>Context</tt>
+will later invoke the listeners in newly-created threads.  As <code>Context</code>
 instances are not guaranteed to be thread-safe in general, all context
 operations must be synchronized as needed.
 
@@ -107,9 +107,9 @@
 on the server that will eventually be translated into events.
 If an exception occurs that prevents information about the events from
 being collected, the listener will never be notified of the events.
-When such an exception occurs, a <tt>NamingExceptionEvent</tt> is
+When such an exception occurs, a <code>NamingExceptionEvent</code> is
 fired to notify the listener. The listener's
-<tt>namingExceptionThrown()</tt> method is invoked, as shown in the 
+<code>namingExceptionThrown()</code> method is invoked, as shown in the
 sample code above,
 and the listener is automatically deregistered.
 
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/BasicControl.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/BasicControl.java	Mon Aug 10 14:05:37 2015 +0300
@@ -26,7 +26,7 @@
 package javax.naming.ldap;
 
 /**
- * This class provides a basic implementation of the <tt>Control</tt>
+ * This class provides a basic implementation of the {@code Control}
  * interface. It represents an LDAPv3 Control as defined in
  * <a href="http://www.ietf.org/rfc/rfc2251.txt">RFC 2251</a>.
  *
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/Control.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/Control.java	Mon Aug 10 14:05:37 2015 +0300
@@ -52,13 +52,13 @@
 public interface Control extends java.io.Serializable {
     /**
       * Indicates a critical control.
-      * The value of this constant is <tt>true</tt>.
+      * The value of this constant is {@code true}.
       */
     public static final boolean CRITICAL = true;
 
     /**
       * Indicates a non-critical control.
-      * The value of this constant is <tt>false</tt>.
+      * The value of this constant is {@code false}.
       */
     public static final boolean NONCRITICAL = false;
 
@@ -75,7 +75,7 @@
       * In other words, if the server receives a critical control
       * that it does not support, regardless of whether the control
       * makes sense for the operation, the operation will not be performed
-      * and an <tt>OperationNotSupportedException</tt> will be thrown.
+      * and an {@code OperationNotSupportedException} will be thrown.
       * @return true if this control is critical; false otherwise.
       */
     public boolean isCritical();
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java	Mon Aug 10 14:05:37 2015 +0300
@@ -65,7 +65,7 @@
       * Without this mechanism, the provider would be returning
       * controls that only contained data in BER encoded format.
       *<p>
-      * Typically, <tt>ctl</tt> is a "basic" control containing
+      * Typically, {@code ctl} is a "basic" control containing
       * BER encoded data. The factory is used to create a specialized
       * control implementation, usually by decoding the BER encoded data,
       * that provides methods to access that data in a type-safe and friendly
@@ -80,14 +80,14 @@
       * it is the only intended factory and that no other control factories
       * should be tried. This might happen, for example, if the BER data
       * in the control does not match what is expected of a control with
-      * the given OID. Since this method throws <tt>NamingException</tt>,
+      * the given OID. Since this method throws {@code NamingException},
       * any other internally generated exception that should be propagated
-      * must be wrapped inside a <tt>NamingException</tt>.
+      * must be wrapped inside a {@code NamingException}.
       *
       * @param ctl A non-null control.
       *
       * @return A possibly null Control.
-      * @exception NamingException If <tt>ctl</tt> contains invalid data that prevents it
+      * @exception NamingException If {@code ctl} contains invalid data that prevents it
       * from being used to create a control. A factory should only throw
       * an exception if it knows how to produce the control (identified by the OID)
       * but is unable to because of, for example invalid BER data.
@@ -100,14 +100,14 @@
       * The following rule is used to create the control:
       *<ul>
       * <li> Use the control factories specified in
-      *    the <tt>LdapContext.CONTROL_FACTORIES</tt> property of the
+      *    the {@code LdapContext.CONTROL_FACTORIES} property of the
       *    environment, and of the provider resource file associated with
-      *    <tt>ctx</tt>, in that order.
+      *    {@code ctx}, in that order.
       *    The value of this property is a colon-separated list of factory
       *    class names that are tried in order, and the first one that succeeds
       *    in creating the control is the one used.
       *    If none of the factories can be loaded,
-      *    return <code>ctl</code>.
+      *    return {@code ctl}.
       *    If an exception is encountered while creating the control, the
       *    exception is passed up to the caller.
       *</ul>
@@ -119,9 +119,9 @@
       * @param ctx The possibly null context in which the control is being created.
       * If null, no such information is available.
       * @param env The possibly null environment of the context. This is used
-      * to find the value of the <tt>LdapContext.CONTROL_FACTORIES</tt> property.
-      * @return A control object created using <code>ctl</code>; or
-      *         <code>ctl</code> if a control object cannot be created using
+      * to find the value of the {@code LdapContext.CONTROL_FACTORIES} property.
+      * @return A control object created using {@code ctl}; or
+      *         {@code ctl} if a control object cannot be created using
       *         the algorithm described above.
       * @exception NamingException if a naming exception was encountered
       *         while attempting to create the control object.
@@ -129,7 +129,7 @@
       *         exception, it is propagated up to the caller.
       * If an error was encountered while loading
       * and instantiating the factory and object classes, the exception
-      * is wrapped inside a <tt>NamingException</tt> and then rethrown.
+      * is wrapped inside a {@code NamingException} and then rethrown.
       */
     public static Control getControlInstance(Control ctl, Context ctx,
                                              Hashtable<?,?> env)
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -43,7 +43,7 @@
   * the classes that implement this interface, supplying them with
   * any information required for a particular extended operation request.
   * It would then pass such a class as an argument to the
-  * <tt>LdapContext.extendedOperation()</tt> method for performing the
+  * {@code LdapContext.extendedOperation()} method for performing the
   * LDAPv3 extended operation.
   *<p>
   * For example, suppose the LDAP server supported a 'get time' extended operation.
@@ -90,7 +90,7 @@
       * Retrieves the object identifier of the request.
       *
       * @return The non-null object identifier string representing the LDAP
-      *         <tt>ExtendedRequest.requestName</tt> component.
+      *         {@code ExtendedRequest.requestName} component.
       */
     public String getID();
 
@@ -104,7 +104,7 @@
       * put into the extended operation to be sent to the LDAP server.
       *
       * @return A possibly null byte array representing the ASN.1 BER encoded
-      *         contents of the LDAP <tt>ExtendedRequest.requestValue</tt>
+      *         contents of the LDAP {@code ExtendedRequest.requestValue}
       *         component.
       * @exception IllegalStateException If the encoded value cannot be retrieved
       * because the request contains insufficient or invalid data/state.
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedResponse.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedResponse.java	Mon Aug 10 14:05:37 2015 +0300
@@ -78,7 +78,7 @@
       * If the server does not send it, the response will contain no ID (i.e. null).
       *
       * @return A possibly null object identifier string representing the LDAP
-      *         <tt>ExtendedResponse.responseName</tt> component.
+      *         {@code ExtendedResponse.responseName} component.
       */
     public String getID();
 
@@ -90,7 +90,7 @@
       * the response value. It does not include the response OID.
       *
       * @return A possibly null byte array representing the ASN.1 BER encoded
-      *         contents of the LDAP <tt>ExtendedResponse.response</tt>
+      *         contents of the LDAP {@code ExtendedResponse.response}
       *         component.
       */
     public byte[] getEncodedValue();
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/HasControls.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/HasControls.java	Mon Aug 10 14:05:37 2015 +0300
@@ -60,10 +60,10 @@
 public interface HasControls {
 
     /**
-      * Retrieves an array of <tt>Control</tt>s from the object that
+      * Retrieves an array of {@code Control}s from the object that
       * implements this interface. It is null if there are no controls.
       *
-      * @return A possibly null array of <tt>Control</tt> objects.
+      * @return A possibly null array of {@code Control} objects.
       * @throws NamingException If cannot return controls due to an error.
       */
     public Control[] getControls() throws NamingException;
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/InitialLdapContext.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/InitialLdapContext.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,24 +34,24 @@
   * This class is the starting context for performing
   * LDAPv3-style extended operations and controls.
   *<p>
-  * See <tt>javax.naming.InitialContext</tt> and
-  * <tt>javax.naming.InitialDirContext</tt> for details on synchronization,
+  * See {@code javax.naming.InitialContext} and
+  * {@code javax.naming.InitialDirContext} for details on synchronization,
   * and the policy for how an initial context is created.
   *
   * <h1>Request Controls</h1>
-  * When you create an initial context (<tt>InitialLdapContext</tt>),
+  * When you create an initial context ({@code InitialLdapContext}),
   * you can specify a list of request controls.
   * These controls will be used as the request controls for any
   * implicit LDAP "bind" operation performed by the context or contexts
   * derived from the context. These are called <em>connection request controls</em>.
-  * Use <tt>getConnectControls()</tt> to get a context's connection request
+  * Use {@code getConnectControls()} to get a context's connection request
   * controls.
   *<p>
   * The request controls supplied to the initial context constructor
   * are <em>not</em> used as the context request controls
   * for subsequent context operations such as searches and lookups.
   * Context request controls are set and updated by using
-  * <tt>setRequestControls()</tt>.
+  * {@code setRequestControls()}.
   *<p>
   * As shown, there can be two different sets of request controls
   * associated with a context: connection request controls and context
@@ -67,14 +67,14 @@
   * Controls[] respCtls =  lctx.getResponseControls();
   *</pre></blockquote>
   * It specifies first the critical controls for creating the initial context
-  * (<tt>critConnCtls</tt>), and then sets the context's request controls
-  * (<tt>critModCtls</tt>) for the context operation. If for some reason
-  * <tt>lctx</tt> needs to reconnect to the server, it will use
-  * <tt>critConnCtls</tt>. See the <tt>LdapContext</tt> interface for
+  * ({@code critConnCtls}), and then sets the context's request controls
+  * ({@code critModCtls}) for the context operation. If for some reason
+  * {@code lctx} needs to reconnect to the server, it will use
+  * {@code critConnCtls}. See the {@code LdapContext} interface for
   * more discussion about request controls.
   *<p>
   * Service provider implementors should read the "Service Provider" section
-  * in the <tt>LdapContext</tt> class description for implementation details.
+  * in the {@code LdapContext} class description for implementation details.
   *
   * @author Rosanna Lee
   * @author Scott Seligman
@@ -94,7 +94,7 @@
     /**
      * Constructs an initial context using no environment properties or
      * connection request controls.
-     * Equivalent to <tt>new InitialLdapContext(null, null)</tt>.
+     * Equivalent to {@code new InitialLdapContext(null, null)}.
      *
      * @throws  NamingException if a naming exception is encountered
      */
@@ -105,15 +105,15 @@
     /**
      * Constructs an initial context
      * using environment properties and connection request controls.
-     * See <tt>javax.naming.InitialContext</tt> for a discussion of
+     * See {@code javax.naming.InitialContext} for a discussion of
      * environment properties.
      *
      * <p> This constructor will not modify its parameters or
      * save references to them, but may save a clone or copy.
      * Caller should not modify mutable keys and values in
-     * <tt>environment</tt> after it has been passed to the constructor.
+     * {@code environment} after it has been passed to the constructor.
      *
-     * <p> <tt>connCtls</tt> is used as the underlying context instance's
+     * <p> {@code connCtls} is used as the underlying context instance's
      * connection request controls.  See the class description
      * for details.
      *
@@ -159,7 +159,7 @@
      *
      * @return The non-null cached initial context.
      * @exception NotContextException If the initial context is not an
-     * instance of <tt>LdapContext</tt>.
+     * instance of {@code LdapContext}.
      * @exception NamingException If a naming exception was encountered.
      */
     private LdapContext getDefaultLdapInitCtx() throws NamingException{
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapContext.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapContext.java	Mon Aug 10 14:05:37 2015 +0300
@@ -35,7 +35,7 @@
  * extended operations.
  *
  * For applications that do not require such controls or extended
- * operations, the more generic <tt>javax.naming.directory.DirContext</tt>
+ * operations, the more generic {@code javax.naming.directory.DirContext}
  * should be used instead.
  *
  * <h3>Usage Details About Controls</h3>
@@ -44,7 +44,7 @@
  * At a high level, this support allows a user
  * program to set request controls for LDAP operations that are executed
  * in the course of the user program's invocation of
- * <tt>Context</tt>/<tt>DirContext</tt>
+ * {@code Context}/{@code DirContext}
  * methods, and read response controls resulting from LDAP operations.
  * At the implementation level, there are some details that developers of
  * both the user program and service providers need to understand in order
@@ -78,60 +78,60 @@
  * <h4>Context Request Controls</h4>
  * There are two ways in which a context instance gets its request controls:
  * <ol>
- * <li><tt>ldapContext.newInstance(<strong>reqCtls</strong>)</tt>
- * <li><tt>ldapContext.setRequestControls(<strong>reqCtls</strong>)</tt>
+ * <li><code>ldapContext.newInstance(<strong>reqCtls</strong>)</code>
+ * <li><code>ldapContext.setRequestControls(<strong>reqCtls</strong>)</code>
  * </ol>
- * where <tt>ldapContext</tt> is an instance of <tt>LdapContext</tt>.
- * Specifying <tt>null</tt> or an empty array for <tt>reqCtls</tt>
+ * where {@code ldapContext} is an instance of {@code LdapContext}.
+ * Specifying {@code null} or an empty array for {@code reqCtls}
  * means no request controls.
- * <tt>newInstance()</tt> creates a new instance of a context using
- * <tt>reqCtls</tt>, while <tt>setRequestControls()</tt>
- * updates an existing context instance's request controls to <tt>reqCtls</tt>.
+ * {@code newInstance()} creates a new instance of a context using
+ * {@code reqCtls}, while {@code setRequestControls()}
+ * updates an existing context instance's request controls to {@code reqCtls}.
  * <p>
  * Unlike environment properties, request controls of a context instance
  * <em>are not inherited</em> by context instances that are derived from
- * it.  Derived context instances have <tt>null</tt> as their context
+ * it.  Derived context instances have {@code null} as their context
  * request controls.  You must set the request controls of a derived context
- * instance explicitly using <tt>setRequestControls()</tt>.
+ * instance explicitly using {@code setRequestControls()}.
  * <p>
  * A context instance's request controls are retrieved using
- * the method <tt>getRequestControls()</tt>.
+ * the method {@code getRequestControls()}.
  *
  * <h4>Connection Request Controls</h4>
  * There are three ways in which connection request controls are set:
  * <ol>
- * <li><tt>
- * new InitialLdapContext(env, <strong>connCtls</strong>)</tt>
- * <li><tt>refException.getReferralContext(env, <strong>connCtls</strong>)</tt>
- * <li><tt>ldapContext.reconnect(<strong>connCtls</strong>);</tt>
+ * <li><code>
+ * new InitialLdapContext(env, <strong>connCtls</strong>)</code>
+ * <li><code>refException.getReferralContext(env, <strong>connCtls</strong>)</code>
+ * <li><code>ldapContext.reconnect(<strong>connCtls</strong>);</code>
  * </ol>
- * where <tt>refException</tt> is an instance of
- * <tt>LdapReferralException</tt>, and <tt>ldapContext</tt> is an
- * instance of <tt>LdapContext</tt>.
- * Specifying <tt>null</tt> or an empty array for <tt>connCtls</tt>
+ * where {@code refException} is an instance of
+ * {@code LdapReferralException}, and {@code ldapContext} is an
+ * instance of {@code LdapContext}.
+ * Specifying {@code null} or an empty array for {@code connCtls}
  * means no connection request controls.
  * <p>
  * Like environment properties, connection request controls of a context
  * <em>are inherited</em> by contexts that are derived from it.
  * Typically, you initialize the connection request controls using the
- * <tt>InitialLdapContext</tt> constructor or
- * <tt>LdapReferralContext.getReferralContext()</tt>. These connection
+ * {@code InitialLdapContext} constructor or
+ * {@code LdapReferralContext.getReferralContext()}. These connection
  * request controls are inherited by contexts that share the same
  * connection--that is, contexts derived from the initial or referral
  * contexts.
  * <p>
- * Use <tt>reconnect()</tt> to change the connection request controls of
+ * Use {@code reconnect()} to change the connection request controls of
  * a context.
- * Invoking <tt>ldapContext.reconnect()</tt> affects only the
- * connection used by <tt>ldapContext</tt> and any new contexts instances that are
- * derived form <tt>ldapContext</tt>. Contexts that previously shared the
- * connection with <tt>ldapContext</tt> remain unchanged. That is, a context's
+ * Invoking {@code ldapContext.reconnect()} affects only the
+ * connection used by {@code ldapContext} and any new contexts instances that are
+ * derived form {@code ldapContext}. Contexts that previously shared the
+ * connection with {@code ldapContext} remain unchanged. That is, a context's
  * connection request controls must be explicitly changed and is not
  * affected by changes to another context's connection request
  * controls.
  * <p>
  * A context instance's connection request controls are retrieved using
- * the method <tt>getConnectControls()</tt>.
+ * the method {@code getConnectControls()}.
  *
  * <h4>Service Provider Requirements</h4>
  *
@@ -145,22 +145,22 @@
  *
  * <h3>Response Controls</h3>
  *
- * The method <tt>LdapContext.getResponseControls()</tt> is used to
+ * The method {@code LdapContext.getResponseControls()} is used to
  * retrieve the response controls generated by LDAP operations executed
- * as the result of invoking a <tt>Context</tt>/<tt>DirContext</tt>
+ * as the result of invoking a {@code Context}/{@code DirContext}
  * operation. The result is all of the responses controls generated
  * by the underlying LDAP operations, including any implicit reconnection.
  * To get only the reconnection response controls,
- * use <tt>reconnect()</tt> followed by <tt>getResponseControls()</tt>.
+ * use {@code reconnect()} followed by {@code getResponseControls()}.
  *
  * <h3>Parameters</h3>
  *
- * A <tt>Control[]</tt> array
+ * A {@code Control[]} array
  * passed as a parameter to any method is owned by the caller.
  * The service provider will not modify the array or keep a reference to it,
- * although it may keep references to the individual <tt>Control</tt> objects
+ * although it may keep references to the individual {@code Control} objects
  * in the array.
- * A <tt>Control[]</tt> array returned by any method is immutable, and may
+ * A {@code Control[]} array returned by any method is immutable, and may
  * not subsequently be modified by either the caller or the service provider.
  *
  * @author Rosanna Lee
@@ -207,7 +207,7 @@
      * to use for the new context.
      * If null, the context is initialized with no request controls.
      *
-     * @return A non-null <tt>LdapContext</tt> instance.
+     * @return A non-null {@code LdapContext} instance.
      * @exception NamingException If an error occurred while creating
      * the new instance.
      * @see InitialLdapContext
@@ -224,16 +224,16 @@
      * the LDAP "bind" operation, or to explicitly connect to the server
      * to get response controls returned by the LDAP "bind" operation.
      *<p>
-     * This method sets this context's <tt>connCtls</tt>
+     * This method sets this context's {@code connCtls}
      * to be its new connection request controls. This context's
      * context request controls are not affected.
      * After this method has been invoked, any subsequent
-     * implicit reconnections will be done using <tt>connCtls</tt>.
-     * <tt>connCtls</tt> are also used as
+     * implicit reconnections will be done using {@code connCtls}.
+     * {@code connCtls} are also used as
      * connection request controls for new context instances derived from this
      * context.
      * These connection request controls are not
-     * affected by <tt>setRequestControls()</tt>.
+     * affected by {@code setRequestControls()}.
      *<p>
      * Service provider implementors should read the "Service Provider" section
      * in the class description for implementation details.
@@ -266,17 +266,17 @@
      * caller.
      * <p>
      * This removes any previous request controls and adds
-     * <tt>requestControls</tt>
+     * {@code requestControls}
      * for use by subsequent methods invoked on this context.
      * This method does not affect this context's connection request controls.
      *<p>
-     * Note that <tt>requestControls</tt> will be in effect until the next
-     * invocation of <tt>setRequestControls()</tt>. You need to explicitly
-     * invoke <tt>setRequestControls()</tt> with <tt>null</tt> or an empty
+     * Note that {@code requestControls} will be in effect until the next
+     * invocation of {@code setRequestControls()}. You need to explicitly
+     * invoke {@code setRequestControls()} with {@code null} or an empty
      * array to clear the controls if you don't want them to affect the
      * context methods any more.
      * To check what request controls are in effect for this context, use
-     * <tt>getRequestControls()</tt>.
+     * {@code getRequestControls()}.
      * @param requestControls The possibly null controls to use. If null, no
      * controls are used.
      * @exception NamingException If an error occurred while setting the
@@ -312,10 +312,10 @@
      *<p>
      * When a context method that may return response controls is invoked,
      * response controls from the previous method invocation are cleared.
-     * <tt>getResponseControls()</tt> returns all of the response controls
+     * {@code getResponseControls()} returns all of the response controls
      * generated by LDAP operations used by the context method in the order
      * received from the LDAP server.
-     * Invoking <tt>getResponseControls()</tt> does not
+     * Invoking {@code getResponseControls()} does not
      * clear the response controls. You can call it many times (and get
      * back the same controls) until the next context method that may return
      * controls is invoked.
@@ -333,7 +333,7 @@
      * of the property should be a colon-separated list of the fully
      * qualified class names of factory classes that will create a control
      * given another control. See
-     * <tt>ControlFactory.getControlInstance()</tt> for details.
+     * {@code ControlFactory.getControlInstance()} for details.
      * This property may be specified in the environment, a system property,
      * or one or more resource files.
      *<p>
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapName.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapName.java	Mon Aug 10 14:05:37 2015 +0300
@@ -59,7 +59,7 @@
  *      characters (unescaped) are accepted.
  * </ul>
  *<p>
- * String names passed to <code>LdapName</code> or returned by it
+ * String names passed to {@code LdapName} or returned by it
  * use the full Unicode character set. They may also contain
  * characters encoded into UTF-8 with each octet represented by a
  * three-character substring such as "\\B4".
@@ -67,7 +67,7 @@
  * each octet represented by a single character in the string:  the
  * meaning would be ambiguous.
  *<p>
- * <code>LdapName</code> will properly parse all valid names, but
+ * {@code LdapName} will properly parse all valid names, but
  * does not attempt to detect all possible violations when parsing
  * invalid names.  It is "generous" in accepting invalid names.
  * The "validity" of a name is determined ultimately when it
@@ -92,7 +92,7 @@
  * empty LDAP name is represented by an empty RDN list.
  *<p>
  * Concurrent multithreaded read-only access of an instance of
- * <tt>LdapName</tt> need not be synchronized.
+ * {@code LdapName} need not be synchronized.
  *<p>
  * Unless otherwise noted, the behavior of passing a null argument
  * to a constructor or method in this class will cause a
@@ -129,7 +129,7 @@
      * The indexing of RDNs in the list follows the numbering of
      * RDNs described in the class description.
      *
-     * @param rdns The non-null list of <tt>Rdn</tt>s forming this LDAP name.
+     * @param rdns The non-null list of {@code Rdn}s forming this LDAP name.
      */
     public LdapName(List<Rdn> rdns) {
 
@@ -240,7 +240,7 @@
      * that is returned and vice versa.
      * @param  posn     The 0-based index of the component at which to stop.
      *                  Must be in the range [0,size()].
-     * @return  An instance of <tt>LdapName</tt> consisting of the
+     * @return  An instance of {@code LdapName} consisting of the
      *          components at indexes in the range [0,posn).
      *          If posn is zero, an empty LDAP name is returned.
      * @exception   IndexOutOfBoundsException
@@ -263,7 +263,7 @@
      *
      * @param  posn     The 0-based index of the component at which to start.
      *                  Must be in the range [0,size()].
-     * @return  An instance of <tt>LdapName</tt> consisting of the
+     * @return  An instance of {@code LdapName} consisting of the
      *          components at indexes in the range [posn,size()).
      *          If posn is equal to size(), an empty LDAP name is
      *          returned.
@@ -282,13 +282,13 @@
     /**
      * Determines whether this LDAP name starts with a specified LDAP name
      * prefix.
-     * A name <tt>n</tt> is a prefix if it is equal to
-     * <tt>getPrefix(n.size())</tt>--in other words this LDAP
+     * A name {@code n} is a prefix if it is equal to
+     * {@code getPrefix(n.size())}--in other words this LDAP
      * name starts with 'n'. If n is null or not a RFC2253 formatted name
      * as described in the class description, false is returned.
      *
      * @param n The LDAP name to check.
-     * @return  true if <tt>n</tt> is a prefix of this LDAP name,
+     * @return  true if {@code n} is a prefix of this LDAP name,
      * false otherwise.
      * @see #getPrefix(int posn)
      */
@@ -309,8 +309,8 @@
      * getRdn(p) matches rdns.get(p). Returns false otherwise. If rdns is
      * null, false is returned.
      *
-     * @param rdns The sequence of <tt>Rdn</tt>s to check.
-     * @return  true if <tt>rdns</tt> form a prefix of this LDAP name,
+     * @param rdns The sequence of {@code Rdn}s to check.
+     * @return  true if {@code rdns} form a prefix of this LDAP name,
      *          false otherwise.
      */
     public boolean startsWith(List<Rdn> rdns) {
@@ -326,13 +326,13 @@
     /**
      * Determines whether this LDAP name ends with a specified
      * LDAP name suffix.
-     * A name <tt>n</tt> is a suffix if it is equal to
-     * <tt>getSuffix(size()-n.size())</tt>--in other words this LDAP
+     * A name {@code n} is a suffix if it is equal to
+     * {@code getSuffix(size()-n.size())}--in other words this LDAP
      * name ends with 'n'. If n is null or not a RFC2253 formatted name
      * as described in the class description, false is returned.
      *
      * @param n The LDAP name to check.
-     * @return true if <tt>n</tt> is a suffix of this name, false otherwise.
+     * @return true if {@code n} is a suffix of this name, false otherwise.
      * @see #getSuffix(int posn)
      */
     public boolean endsWith(Name n) {
@@ -352,8 +352,8 @@
      * the component getRdn(p) matches rdns.get(p). Returns false otherwise.
      * If rdns is null, false is returned.
      *
-     * @param rdns The sequence of <tt>Rdn</tt>s to check.
-     * @return  true if <tt>rdns</tt> form a suffix of this LDAP name,
+     * @param rdns The sequence of {@code Rdn}s to check.
+     * @return  true if {@code rdns} form a suffix of this LDAP name,
      *          false otherwise.
      */
     public boolean endsWith(List<Rdn> rdns) {
@@ -409,7 +409,7 @@
      * @param   suffix The non-null components to add.
      * @return  The updated name (not a new instance).
      *
-     * @throws  InvalidNameException if <tt>suffix</tt> is not a valid LDAP
+     * @throws  InvalidNameException if {@code suffix} is not a valid LDAP
      *          name, or if the addition of the components would violate the
      *          syntax rules of this LDAP name.
      */
@@ -421,7 +421,7 @@
     /**
      * Adds the RDNs of a name -- in order -- to the end of this name.
      *
-     * @param   suffixRdns The non-null suffix <tt>Rdn</tt>s to add.
+     * @param   suffixRdns The non-null suffix {@code Rdn}s to add.
      * @return  The updated name (not a new instance).
      */
     public Name addAll(List<Rdn> suffixRdns) {
@@ -440,7 +440,7 @@
      *
      * @return  The updated name (not a new instance).
      *
-     * @throws  InvalidNameException if <tt>suffix</tt> is not a valid LDAP
+     * @throws  InvalidNameException if {@code suffix} is not a valid LDAP
      *          name, or if the addition of the components would violate the
      *          syntax rules of this LDAP name.
      * @throws  IndexOutOfBoundsException
@@ -469,7 +469,7 @@
      * index (if any) of the first new RDN are shifted up (away from index 0) to
      * accommodate the new RDNs.
      *
-     * @param suffixRdns        The non-null suffix <tt>Rdn</tt>s to add.
+     * @param suffixRdns        The non-null suffix {@code Rdn}s to add.
      * @param posn              The index at which to add the suffix RDNs.
      *                          Must be in the range [0,size()].
      *
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapReferralException.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapReferralException.java	Mon Aug 10 14:05:37 2015 +0300
@@ -32,15 +32,15 @@
 
 /**
  * This abstract class is used to represent an LDAP referral exception.
- * It extends the base <tt>ReferralException</tt> by providing a
- * <tt>getReferralContext()</tt> method that accepts request controls.
+ * It extends the base {@code ReferralException} by providing a
+ * {@code getReferralContext()} method that accepts request controls.
  * LdapReferralException is an abstract class. Concrete implementations of it
  * determine its synchronization and serialization properties.
  *<p>
- * A <tt>Control[]</tt> array passed as a parameter to
- * the <tt>getReferralContext()</tt> method is owned by the caller.
+ * A {@code Control[]} array passed as a parameter to
+ * the {@code getReferralContext()} method is owned by the caller.
  * The service provider will not modify the array or keep a reference to it,
- * although it may keep references to the individual <tt>Control</tt> objects
+ * although it may keep references to the individual {@code Control} objects
  * in the array.
  *
  * @author Rosanna Lee
@@ -73,20 +73,20 @@
      * Retrieves the context at which to continue the method using the
      * context's environment and no controls.
      * The referral context is created using the environment properties of
-     * the context that threw the <tt>ReferralException</tt> and no controls.
+     * the context that threw the {@code ReferralException} and no controls.
      *<p>
      * This method is equivalent to
      *<blockquote><pre>
      * getReferralContext(ctx.getEnvironment(), null);
      *</pre></blockquote>
-     * where <tt>ctx</tt> is the context that threw the <tt>ReferralException.</tt>
+     * where {@code ctx} is the context that threw the {@code ReferralException.}
      *<p>
      * It is overridden in this class for documentation purposes only.
-     * See <tt>ReferralException</tt> for how to use this method.
+     * See {@code ReferralException} for how to use this method.
      *
      * @return The non-null context at which to continue the method.
      * @exception NamingException If a naming exception was encountered.
-     * Call either <tt>retryReferral()</tt> or <tt>skipReferral()</tt>
+     * Call either {@code retryReferral()} or {@code skipReferral()}
      * to continue processing referrals.
      */
     public abstract Context getReferralContext() throws NamingException;
@@ -94,7 +94,7 @@
     /**
      * Retrieves the context at which to continue the method using
      * environment properties and no controls.
-     * The referral context is created using <tt>env</tt> as its environment
+     * The referral context is created using {@code env} as its environment
      * properties and no controls.
      *<p>
      * This method is equivalent to
@@ -103,14 +103,14 @@
      *</pre></blockquote>
      *<p>
      * It is overridden in this class for documentation purposes only.
-     * See <tt>ReferralException</tt> for how to use this method.
+     * See {@code ReferralException} for how to use this method.
      *
      * @param env The possibly null environment to use when retrieving the
      *          referral context. If null, no environment properties will be used.
      *
      * @return The non-null context at which to continue the method.
      * @exception NamingException If a naming exception was encountered.
-     * Call either <tt>retryReferral()</tt> or <tt>skipReferral()</tt>
+     * Call either {@code retryReferral()} or {@code skipReferral()}
      * to continue processing referrals.
      */
     public abstract Context
@@ -127,12 +127,12 @@
      * To continue the operation, the client program should re-invoke
      * the method using the same arguments as the original invocation.
      *<p>
-     * <tt>reqCtls</tt> is used when creating the connection to the referred
+     * {@code reqCtls} is used when creating the connection to the referred
      * server. These controls will be used as the connection request controls for
      * the context and context instances
      * derived from the context.
-     * <tt>reqCtls</tt> will also be the context's request controls for
-     * subsequent context operations. See the <tt>LdapContext</tt> class
+     * {@code reqCtls} will also be the context's request controls for
+     * subsequent context operations. See the {@code LdapContext} class
      * description for details.
      *<p>
      * This method should be used instead of the other two overloaded forms
@@ -141,7 +141,7 @@
      * it needs to supply special controls relating to authentication.
      *<p>
      * Service provider implementors should read the "Service Provider" section
-     * in the <tt>LdapContext</tt> class description for implementation details.
+     * in the {@code LdapContext} class description for implementation details.
      *
      * @param reqCtls The possibly null request controls to use for the new context.
      * If null or the empty array means use no request controls.
@@ -150,7 +150,7 @@
      * properties.
      * @return The non-null context at which to continue the method.
      * @exception NamingException If a naming exception was encountered.
-     * Call either <tt>retryReferral()</tt> or <tt>skipReferral()</tt>
+     * Call either {@code retryReferral()} or {@code skipReferral()}
      * to continue processing referrals.
      */
     public abstract Context
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/Rdn.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/Rdn.java	Mon Aug 10 14:05:37 2015 +0300
@@ -50,7 +50,7 @@
  * An example of an RDN is "OU=Sales+CN=J.Smith". In this example,
  * the RDN consist of multiple attribute type/value pairs. The
  * RDN is parsed as described in the class description for
- * {@link javax.naming.ldap.LdapName <tt>LdapName</tt>}.
+ * {@link javax.naming.ldap.LdapName LdapName}.
  * <p>
  * The Rdn class represents an RDN as attribute type/value mappings,
  * which can be viewed using
@@ -79,11 +79,11 @@
  *      Rdn rdn = new Rdn("cn", "Juicy, Fruit");
  *      System.out.println(rdn.toString());
  * </pre>
- * The last line will print <tt>cn=Juicy\, Fruit</tt>. The
- * {@link #unescapeValue(String) <tt>unescapeValue()</tt>} method can be
+ * The last line will print {@code cn=Juicy\, Fruit}. The
+ * {@link #unescapeValue(String) unescapeValue()} method can be
  * used to unescape the escaped comma resulting in the original
- * value <tt>"Juicy, Fruit"</tt>. The {@link #escapeValue(Object)
- * <tt>escapeValue()</tt>} method adds the escape back preceding the comma.
+ * value {@code "Juicy, Fruit"}. The {@link #escapeValue(Object)
+ * escapeValue()} method adds the escape back preceding the comma.
  * <p>
  * This class can be instantiated by a string representation
  * of the RDN defined in RFC 2253 as shown in the following code example:
@@ -91,10 +91,10 @@
  *      Rdn rdn = new Rdn("cn=Juicy\\, Fruit");
  *      System.out.println(rdn.toString());
  * </pre>
- * The last line will print <tt>cn=Juicy\, Fruit</tt>.
+ * The last line will print {@code cn=Juicy\, Fruit}.
  * <p>
  * Concurrent multithreaded read-only access of an instance of
- * <tt>Rdn</tt> need not be synchronized.
+ * {@code Rdn} need not be synchronized.
  * <p>
  * Unless otherwise noted, the behavior of passing a null argument
  * to a constructor or method in this class will cause NullPointerException
@@ -123,7 +123,7 @@
      *
      * @param attrSet The non-null and non-empty attributes containing
      * type/value mappings.
-     * @throws InvalidNameException If contents of <tt>attrSet</tt> cannot
+     * @throws InvalidNameException If contents of {@code attrSet} cannot
      *          be used to construct a valid RDN.
      */
     public Rdn(Attributes attrSet) throws InvalidNameException {
@@ -166,8 +166,8 @@
     }
 
     /**
-     * Constructs an Rdn from the given <tt>rdn</tt>.
-     * The contents of the <tt>rdn</tt> are simply copied into the newly
+     * Constructs an Rdn from the given {@code rdn}.
+     * The contents of the {@code rdn} are simply copied into the newly
      * created Rdn.
      * @param rdn The non-null Rdn to be copied.
      */
@@ -583,7 +583,7 @@
      * This method is generous in accepting the values and does not
      * catch all illegal values.
      * Therefore, passing in an illegal value might not necessarily
-     * trigger an <tt>IllegalArgumentException</tt>.
+     * trigger an {@code IllegalArgumentException}.
      *
      * @param   val     The non-null string to be unescaped.
      * @return          Unescaped value.
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -43,9 +43,9 @@
  * The object identifier for StartTLS is 1.3.6.1.4.1.1466.20037
  * and no extended request value is defined.
  *<p>
- * <tt>StartTlsRequest</tt>/<tt>StartTlsResponse</tt> are used to establish
+ * {@code StartTlsRequest}/{@code StartTlsResponse} are used to establish
  * a TLS connection over the existing LDAP connection associated with
- * the JNDI context on which <tt>extendedOperation()</tt> is invoked.
+ * the JNDI context on which {@code extendedOperation()} is invoked.
  * Typically, a JNDI program uses these classes as follows.
  * <blockquote><pre>
  * import javax.naming.ldap.*;
@@ -127,16 +127,16 @@
      * <p>
      * This method locates the implementation class by locating
      * configuration files that have the name:
-     * <blockquote><tt>
+     * <blockquote>{@code
      *     META-INF/services/javax.naming.ldap.StartTlsResponse
-     * </tt></blockquote>
+     * }</blockquote>
      * The configuration files and their corresponding implementation classes must
      * be accessible to the calling thread's context class loader.
      * <p>
      * Each configuration file should contain a list of fully-qualified class
      * names, one per line.  Space and tab characters surrounding each name, as
-     * well as blank lines, are ignored.  The comment character is <tt>'#'</tt>
-     * (<tt>0x23</tt>); on each line all characters following the first comment
+     * well as blank lines, are ignored.  The comment character is {@code '#'}
+     * ({@code 0x23}); on each line all characters following the first comment
      * character are ignored.  The file must be encoded in UTF-8.
      * <p>
      * This method will return an instance of the first implementation
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsResponse.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsResponse.java	Mon Aug 10 14:05:37 2015 +0300
@@ -42,7 +42,7 @@
  *<p>
  * The Start TLS extended request and response are used to establish
  * a TLS connection over the existing LDAP connection associated with
- * the JNDI context on which <tt>extendedOperation()</tt> is invoked.
+ * the JNDI context on which {@code extendedOperation()} is invoked.
  * Typically, a JNDI program uses the StartTLS extended request and response
  * classes as follows.
  * <blockquote><pre>
@@ -122,7 +122,7 @@
     /**
      * Overrides the default list of cipher suites enabled for use on the
      * TLS connection. The cipher suites must have already been listed by
-     * <tt>SSLSocketFactory.getSupportedCipherSuites()</tt> as being supported.
+     * {@code SSLSocketFactory.getSupportedCipherSuites()} as being supported.
      * Even if a suite has been enabled, it still might not be used because
      * the peer does not support it, or because the requisite certificates
      * (and private keys) are not available.
@@ -134,13 +134,13 @@
     public abstract void setEnabledCipherSuites(String[] suites);
 
     /**
-     * Sets the hostname verifier used by <tt>negotiate()</tt>
+     * Sets the hostname verifier used by {@code negotiate()}
      * after the TLS handshake has completed and the default hostname
      * verification has failed.
-     * <tt>setHostnameVerifier()</tt> must be called before
-     * <tt>negotiate()</tt> is invoked for it to have effect.
+     * {@code setHostnameVerifier()} must be called before
+     * {@code negotiate()} is invoked for it to have effect.
      * If called after
-     * <tt>negotiate()</tt>, this method does not do anything.
+     * {@code negotiate()}, this method does not do anything.
      *
      * @param verifier The non-null hostname verifier callback.
      * @see #negotiate
@@ -150,7 +150,7 @@
     /**
      * Negotiates a TLS session using the default SSL socket factory.
      * <p>
-     * This method is equivalent to <tt>negotiate(null)</tt>.
+     * This method is equivalent to {@code negotiate(null)}.
      *
      * @return The negotiated SSL session
      * @throws IOException If an IO error was encountered while establishing
@@ -167,16 +167,16 @@
      * attaches it to the existing connection. Performs the TLS handshake
      * and returns the negotiated session information.
      * <p>
-     * If cipher suites have been set via <tt>setEnabledCipherSuites</tt>
+     * If cipher suites have been set via {@code setEnabledCipherSuites}
      * then they are enabled before the TLS handshake begins.
      * <p>
      * Hostname verification is performed after the TLS handshake completes.
      * The default hostname verification performs a match of the server's
      * hostname against the hostname information found in the server's certificate.
      * If this verification fails and no callback has been set via
-     * <tt>setHostnameVerifier</tt> then the negotiation fails.
+     * {@code setHostnameVerifier} then the negotiation fails.
      * If this verification fails and a callback has been set via
-     * <tt>setHostnameVerifier</tt>, then the callback is used to determine whether
+     * {@code setHostnameVerifier}, then the callback is used to determine whether
      * the negotiation succeeds.
      * <p>
      * If an error occurs then the SSL socket is closed and an IOException
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotification.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotification.java	Mon Aug 10 14:05:37 2015 +0300
@@ -32,7 +32,7 @@
  * <A HREF="http://www.ietf.org/rfc/rfc2251.txt">RFC 2251</A>.
  * An unsolicited notification is sent by the LDAP server to the LDAP
  * client without any provocation from the client.
- * Its format is that of an extended response (<tt>ExtendedResponse</tt>).
+ * Its format is that of an extended response ({@code ExtendedResponse}).
  *
  * @author Rosanna Lee
  * @author Scott Seligman
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationEvent.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationEvent.java	Mon Aug 10 14:05:37 2015 +0300
@@ -49,7 +49,7 @@
     private UnsolicitedNotification notice;
 
     /**
-     * Constructs a new instance of <tt>UnsolicitedNotificationEvent</tt>.
+     * Constructs a new instance of {@code UnsolicitedNotificationEvent}.
      *
      * @param src The non-null source that fired the event.
      * @param notice The non-null unsolicited notification.
@@ -71,10 +71,10 @@
     }
 
     /**
-     * Invokes the <tt>notificationReceived()</tt> method on
+     * Invokes the {@code notificationReceived()} method on
      * a listener using this event.
      * @param listener The non-null listener on which to invoke
-     * <tt>notificationReceived</tt>.
+     *        {@code notificationReceived}.
      */
     public void dispatch(UnsolicitedNotificationListener listener) {
         listener.notificationReceived(this);
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationListener.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationListener.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,20 +28,20 @@
 import javax.naming.event.NamingListener;
 
 /**
- * This interface is for handling <tt>UnsolicitedNotificationEvent</tt>.
+ * This interface is for handling {@code UnsolicitedNotificationEvent}.
  * "Unsolicited notification" is defined in
  * <A HREF="http://www.ietf.org/rfc/rfc2251.txt">RFC 2251</A>.
  * It allows the server to send unsolicited notifications to the client.
- * A <tt>UnsolicitedNotificationListener</tt> must:
+ * A {@code UnsolicitedNotificationListener} must:
  *<ol>
  * <li>Implement this interface and its method
- * <li>Implement <tt>NamingListener.namingExceptionThrown()</tt> so
+ * <li>Implement {@code NamingListener.namingExceptionThrown()} so
  * that it will be notified of exceptions thrown while attempting to
  * collect unsolicited notification events.
- * <li>Register with the context using one of the <tt>addNamingListener()</tt>
- * methods from <tt>EventContext</tt> or <tt>EventDirContext</tt>.
- * Only the <tt>NamingListener</tt> argument of these methods are applicable;
- * the rest are ignored for a <tt>UnsolicitedNotificationListener</tt>.
+ * <li>Register with the context using one of the {@code addNamingListener()}
+ * methods from {@code EventContext} or {@code EventDirContext}.
+ * Only the {@code NamingListener} argument of these methods are applicable;
+ * the rest are ignored for a {@code UnsolicitedNotificationListener}.
  * (These arguments might be applicable to the listener if it implements
  * other listener interfaces).
  *</ol>
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html	Mon Aug 10 14:05:37 2015 +0300
@@ -44,15 +44,15 @@
 This package is for applications and service providers that deal with
 LDAPv3 extended operations and controls, as defined by
 <a href=http://www.ietf.org/rfc/rfc2251.txt>RFC 2251</a>.
-The core interface in this package is <tt>LdapContext</tt>, which defines
+The core interface in this package is <code>LdapContext</code>, which defines
 methods on a context for performing extended operations and handling
 controls.
 
 <h4>Extended Operations</h4>
 <p>
-This package defines the interface <tt>ExtendedRequest</tt>
+This package defines the interface <code>ExtendedRequest</code>
 to represent the argument to an extended operation,
-and the interface <tt>ExtendedResponse</tt> to represent the result
+and the interface <code>ExtendedResponse</code> to represent the result
 of the extended operation.
 An extended response is always paired with an extended request
 but not necessarily vice versa. That is, you can have an extended request
@@ -73,7 +73,7 @@
 <p>
 For example, suppose an LDAP server supports a "get time" extended operation.
 It would supply classes such as
-<tt>GetTimeRequest</tt> and <tt>GetTimeResponse</tt>,
+<code>GetTimeRequest</code> and <code>GetTimeResponse</code>,
 so that applications can use this feature.
 An application would use these classes as follows:
 <blockquote><pre>
@@ -82,7 +82,7 @@
 long time = resp.getTime();
 </pre></blockquote>
 <p>
-The <tt>GetTimeRequest</tt> and <tt>GetTimeResponse</tt> classes might
+The <code>GetTimeRequest</code> and <code>GetTimeResponse</code> classes might
 be defined as follows:
 <blockquote><pre>
 public class GetTimeRequest implements ExtendedRequest {
@@ -105,7 +105,7 @@
 public class GetTimeResponse() implements ExtendedResponse {
     long time;
     // called by GetTimeRequest.createExtendedResponse()
-    public GetTimeResponse(String id, byte[] berValue, int offset, int length) 
+    public GetTimeResponse(String id, byte[] berValue, int offset, int length)
         throws NamingException {
         // check validity of id
         long time =  ... // decode berValue to get time
@@ -127,7 +127,7 @@
 
 <h4>Controls</h4>
 
-This package defines the interface <tt>Control</tt> to represent an LDAPv3
+This package defines the interface <code>Control</code> to represent an LDAPv3
 control. It can be a control that is sent to an LDAP server
 (<em>request control</em>) or a control returned by an LDAP server
 (<em>response control</em>).  Unlike extended requests and responses,
@@ -149,8 +149,8 @@
 <p>
 For example, suppose an LDAP server supports a "signed results"
 request control, which when sent with a request, asks the
-server to digitally sign the results of an operation. 
-It would supply a class <tt>SignedResultsControl</tt>  so that applications
+server to digitally sign the results of an operation.
+It would supply a class <code>SignedResultsControl</code>  so that applications
 can use this feature.
 An application  would use this class as follows:
 <blockquote>
@@ -160,7 +160,7 @@
 NamingEnumeration enum = ectx.search(...);
 </pre>
 </blockquote>
-The <tt>SignedResultsControl</tt> class might be defined as follows:
+The <code>SignedResultsControl</code> class might be defined as follows:
 <blockquote><pre>
 public class SignedResultsControl implements Control {
     // User-friendly constructor 
@@ -180,19 +180,19 @@
 </pre></blockquote>
 <p>
 When a service provider receives response controls, it uses
-the <tt>ControlFactory</tt> class to produce specific classes 
-that implement the <tt>Control</tt> interface.
+the <code>ControlFactory</code> class to produce specific classes
+that implement the <code>Control</code> interface.
 <p>
 An LDAP server can send back response controls with an LDAP operation
 and also with enumeration results, such as those returned
 by a list or search operation.
-The <tt>LdapContext</tt> provides a method (<tt>getResponseControls()</tt>)
+The <code>LdapContext</code> provides a method (<code>getResponseControls()</code>)
 for getting the response controls sent with an LDAP operation,
-while the <tt>HasControls</tt> interface is used to retrieve
+while the <code>HasControls</code> interface is used to retrieve
 response controls associated with enumeration results.
 <p>
 For example, suppose an LDAP server sends back a "change ID" control in response
-to a successful modification. It would supply a class <tt>ChangeIDControl</tt>
+to a successful modification. It would supply a class <code>ChangeIDControl</code>
 so that the application can use this feature.
 An application would perform an update, and then try to get the change ID.
 <blockquote><pre>
@@ -211,8 +211,8 @@
     }
 }
 </pre></blockquote>
-The vendor might supply the following <tt>ChangeIDControl</tt> and
-<tt>VendorXControlFactory</tt> classes. The <tt>VendorXControlFactory</tt>
+The vendor might supply the following <code>ChangeIDControl</code> and
+<code>VendorXControlFactory</code> classes. The <code>VendorXControlFactory</code>
 will be used by the service provider when the provider receives response
 controls from the LDAP server.
 <blockquote><pre>
@@ -245,7 +245,7 @@
 
     public Control getControlInstance(Control orig) throws NamingException {
         if (isOneOfMyControls(orig.getID())) {
-	    ... 
+	    ...
 
 	    // determine which of ours it is and call its constructor
 	    return (new ChangeIDControl(orig.getID(), orig.getEncodedValue()));
--- a/jdk/src/java.naming/share/classes/javax/naming/package.html	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/package.html	Mon Aug 10 14:05:37 2015 +0300
@@ -43,13 +43,13 @@
 <h4>Context</h4>
 <p>
 This package defines the notion of a <em>context</em>, represented
-by the <tt>Context</tt> interface.
+by the <code>Context</code> interface.
 A context consists of a set of name-to-object <em>bindings</em>.
-<tt>Context</tt> is the core interface for looking up, binding, unbinding, 
+<code>Context</code> is the core interface for looking up, binding, unbinding,
 and renaming objects, and for creating and destroying subcontexts.
 <p>
-<tt>lookup()</tt> is the most commonly used operation.
-You supply <tt>lookup()</tt>
+<code>lookup()</code> is the most commonly used operation.
+You supply <code>lookup()</code>
 the name of the object you want
 to look up, and it returns the object bound to that name.
 For example, the following code fragment looks up 
@@ -65,17 +65,17 @@
 
 <h4>Names</h4>
 <p>
-Every naming method in the <tt>Context</tt>
+Every naming method in the <code>Context</code>
 interface has two
 overloads: one that accepts a 
-<tt>Name</tt> argument and one that accepts a string name.
-<tt>Name</tt> is an interface that represents a generic 
+<code>Name</code> argument and one that accepts a string name.
+<code>Name</code> is an interface that represents a generic 
 name--an ordered sequence of zero of more components.
-For these methods, <tt>Name</tt> can be used to represent a
-<em>composite name</em> (<tt>CompositeName</tt>)
+For these methods, <code>Name</code> can be used to represent a
+<em>composite name</em> (<code>CompositeName</code>)
 so that you can name an object using a name which spans multiple namespaces.
 <p>
-The overloads that accept <tt>Name</tt>
+The overloads that accept <code>Name</code>
 are useful for applications that need to manipulate names: composing
 them, comparing components, and so on.
 The overloads that accept string names are likely to be more useful
@@ -84,14 +84,14 @@
 
 <h4>Bindings</h4>
 
-The <tt>Binding</tt> class represents a name-to-object binding.
+The <code>Binding</code> class represents a name-to-object binding.
 It is a tuple containing the name of the bound object,
 the name of the object's class, and the object itself.
 <p>
-The <tt>Binding</tt> class is actually a subclass of
-<tt>NameClassPair</tt>, which consists
+The <code>Binding</code> class is actually a subclass of
+<code>NameClassPair</code>, which consists
 simply of the object's name and the object's class name.
-The <tt>NameClassPair</tt> is useful when you only want
+The <code>NameClassPair</code> is useful when you only want
 information about the object's class and do not want to
 pay the extra cost of getting the object.
 
@@ -104,7 +104,7 @@
 objects in the directory, Java programs are but one group of applications 
 that access them. In this case, a serialized Java object might
 not be the most appropriate representation.
-JNDI defines a <em>reference</em>, represented by the <tt>Reference</tt>
+JNDI defines a <em>reference</em>, represented by the <code>Reference</code>
 class, which contains information on how to construct a copy of the object.
 JNDI will attempt to turn references looked up from the directory
 into the Java objects they represent, so that
@@ -117,7 +117,7 @@
 In JNDI, all naming and directory operations are performed relative
 to a context. There are no absolute roots.
 Therefore JNDI defines an <em>initial context</em>, 
-<tt>InitialContext</tt>,
+<code>InitialContext</code>,
 which provides a starting point for naming and directory operations.
 Once you have an initial context, you can use it to
 look up other contexts and objects.
@@ -126,10 +126,10 @@
 
 JNDI defines a class hierarchy for exceptions that can be thrown in
 the course of performing naming and directory operations.  The root of
-this class hierarchy is <tt>NamingException</tt>.
+this class hierarchy is <code>NamingException</code>.
 Programs interested in dealing with a particular exception
 can catch the corresponding subclass of the exception.
-Otherwise, programs should catch <tt>NamingException</tt>.
+Otherwise, programs should catch <code>NamingException</code>.
 
 
 <h2>Package Specification</h2>
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java	Mon Aug 10 14:05:37 2015 +0300
@@ -35,12 +35,12 @@
   *<p>
   * The JNDI framework allows for object implementations to
   * be loaded in dynamically via <em>object factories</em>. See
-  * <tt>ObjectFactory</tt> for details.
+  * {@code ObjectFactory} for details.
   * <p>
-  * A <tt>DirObjectFactory</tt> extends <tt>ObjectFactory</tt> by allowing
-  * an <tt>Attributes</tt> instance
-  * to be supplied to the <tt>getObjectInstance()</tt> method.
-  * <tt>DirObjectFactory</tt> implementations are intended to be used by <tt>DirContext</tt>
+  * A {@code DirObjectFactory} extends {@code ObjectFactory} by allowing
+  * an {@code Attributes} instance
+  * to be supplied to the {@code getObjectInstance()} method.
+  * {@code DirObjectFactory} implementations are intended to be used by {@code DirContext}
   * service providers. The service provider, in addition reading an
   * object from the directory, might already have attributes that
   * are useful for the object factory to check to see whether the
@@ -71,34 +71,34 @@
  * An example of such an environment property is user identity
  * information.
  *<p>
- * <tt>DirectoryManager.getObjectInstance()</tt>
- * successively loads in object factories. If it encounters a <tt>DirObjectFactory</tt>,
- * it will invoke <tt>DirObjectFactory.getObjectInstance()</tt>;
+ * {@code DirectoryManager.getObjectInstance()}
+ * successively loads in object factories. If it encounters a {@code DirObjectFactory},
+ * it will invoke {@code DirObjectFactory.getObjectInstance()};
  * otherwise, it invokes
- * <tt>ObjectFactory.getObjectInstance()</tt>. It does this until a factory
+ * {@code ObjectFactory.getObjectInstance()}. It does this until a factory
  * produces a non-null answer.
  * <p> When an exception
  * is thrown by an object factory, the exception is passed on to the caller
- * of <tt>DirectoryManager.getObjectInstance()</tt>. The search for other factories
+ * of {@code DirectoryManager.getObjectInstance()}. The search for other factories
  * that may produce a non-null answer is halted.
  * An object factory should only throw an exception if it is sure that
  * it is the only intended factory and that no other object factories
  * should be tried.
  * If this factory cannot create an object using the arguments supplied,
  * it should return null.
-  *<p>Since <tt>DirObjectFactory</tt> extends <tt>ObjectFactory</tt>, it
+  *<p>Since {@code DirObjectFactory} extends {@code ObjectFactory}, it
   * effectively
-  * has two <tt>getObjectInstance()</tt> methods, where one differs from the other by
-  * the attributes argument. Given a factory that implements <tt>DirObjectFactory</tt>,
-  * <tt>DirectoryManager.getObjectInstance()</tt> will only
+  * has two {@code getObjectInstance()} methods, where one differs from the other by
+  * the attributes argument. Given a factory that implements {@code DirObjectFactory},
+  * {@code DirectoryManager.getObjectInstance()} will only
   * use the method that accepts the attributes argument, while
-  * <tt>NamingManager.getObjectInstance()</tt> will only use the one that does not accept
+  * {@code NamingManager.getObjectInstance()} will only use the one that does not accept
   * the attributes argument.
  *<p>
- * See <tt>ObjectFactory</tt> for a description URL context factories and other
- * properties of object factories that apply equally to <tt>DirObjectFactory</tt>.
+ * See {@code ObjectFactory} for a description URL context factories and other
+ * properties of object factories that apply equally to {@code DirObjectFactory}.
  *<p>
- * The <tt>name</tt>, <tt>attrs</tt>, and <tt>environment</tt> parameters
+ * The {@code name}, {@code attrs}, and {@code environment} parameters
  * are owned by the caller.
  * The implementation will not modify these objects or keep references
  * to them, although it may keep references to clones or copies.
@@ -112,10 +112,10 @@
  *              relative to the default initial context.
  * @param environment The possibly null environment that is used in
  *              creating the object.
- * @param attrs The possibly null attributes containing some of <tt>obj</tt>'s
- * attributes. <tt>attrs</tt> might not necessarily have all of <tt>obj</tt>'s
+ * @param attrs The possibly null attributes containing some of {@code obj}'s
+ * attributes. {@code attrs} might not necessarily have all of {@code obj}'s
  * attributes. If the object factory requires more attributes, it needs
- * to get it, either using <tt>obj</tt>, or <tt>name</tt> and <tt>nameCtx</tt>.
+ * to get it, either using {@code obj}, or {@code name} and {@code nameCtx}.
  *      The factory must not modify attrs.
  * @return The object created; null if an object cannot be created.
  * @exception Exception If this object factory encountered an exception
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java	Mon Aug 10 14:05:37 2015 +0300
@@ -33,17 +33,17 @@
   * object and corresponding attributes for binding.
   *<p>
   * The JNDI framework allows for object implementations to
-  * be loaded in dynamically via <tt>object factories</tt>.
+  * be loaded in dynamically via {@code object factories}.
   * <p>
-  * A <tt>DirStateFactory</tt> extends <tt>StateFactory</tt>
-  * by allowing an <tt>Attributes</tt> instance
-  * to be supplied to and be returned by the <tt>getStateToBind()</tt> method.
-  * <tt>DirStateFactory</tt> implementations are intended to be used by
-  * <tt>DirContext</tt> service providers.
-  * When a caller binds an object using <tt>DirContext.bind()</tt>,
+  * A {@code DirStateFactory} extends {@code StateFactory}
+  * by allowing an {@code Attributes} instance
+  * to be supplied to and be returned by the {@code getStateToBind()} method.
+  * {@code DirStateFactory} implementations are intended to be used by
+  * {@code DirContext} service providers.
+  * When a caller binds an object using {@code DirContext.bind()},
   * he might also specify a set of attributes to be bound with the object.
   * The object and attributes to be bound are passed to
-  * the <tt>getStateToBind()</tt> method of a factory.
+  * the {@code getStateToBind()} method of a factory.
   * If the factory processes the object and attributes, it returns
   * a corresponding pair of object and attributes to be bound.
   * If the factory does not process the object, it must return null.
@@ -53,23 +53,23 @@
   *<blockquote><pre>
   * ctx.rebind("inky", printer, printerAttrs);
   *</pre></blockquote>
-  * An LDAP service provider for <tt>ctx</tt> uses a <tt>DirStateFactory</tt>
-  * (indirectly via <tt>DirectoryManager.getStateToBind()</tt>)
-  * and gives it <tt>printer</tt> and <tt>printerAttrs</tt>. A factory for
-  * an LDAP directory might turn <tt>printer</tt> into a set of attributes
-  * and merge that with <tt>printerAttrs</tt>. The service provider then
+  * An LDAP service provider for {@code ctx} uses a {@code DirStateFactory}
+  * (indirectly via {@code DirectoryManager.getStateToBind()})
+  * and gives it {@code printer} and {@code printerAttrs}. A factory for
+  * an LDAP directory might turn {@code printer} into a set of attributes
+  * and merge that with {@code printerAttrs}. The service provider then
   * uses the resulting attributes to create an LDAP entry and updates
   * the directory.
   *
-  * <p> Since <tt>DirStateFactory</tt> extends <tt>StateFactory</tt>, it
-  * has two <tt>getStateToBind()</tt> methods, where one
+  * <p> Since {@code DirStateFactory} extends {@code StateFactory}, it
+  * has two {@code getStateToBind()} methods, where one
   * differs from the other by the attributes
-  * argument. <tt>DirectoryManager.getStateToBind()</tt> will only use
+  * argument. {@code DirectoryManager.getStateToBind()} will only use
   * the form that accepts the attributes argument, while
-  * <tt>NamingManager.getStateToBind()</tt> will only use the form that
+  * {@code NamingManager.getStateToBind()} will only use the form that
   * does not accept the attributes argument.
   *
-  * <p> Either form of the <tt>getStateToBind()</tt> method of a
+  * <p> Either form of the {@code getStateToBind()} method of a
   * DirStateFactory may be invoked multiple times, possibly using different
   * parameters.  The implementation is thread-safe.
   *
@@ -85,15 +85,15 @@
  * Retrieves the state of an object for binding given the object and attributes
  * to be transformed.
  *<p>
- * <tt>DirectoryManager.getStateToBind()</tt>
+ * {@code DirectoryManager.getStateToBind()}
  * successively loads in state factories. If a factory implements
- * <tt>DirStateFactory</tt>, <tt>DirectoryManager</tt> invokes this method;
- * otherwise, it invokes <tt>StateFactory.getStateToBind()</tt>.
+ * {@code DirStateFactory}, {@code DirectoryManager} invokes this method;
+ * otherwise, it invokes {@code StateFactory.getStateToBind()}.
  * It does this until a factory produces a non-null answer.
  *<p>
  * When an exception is thrown by a factory,
  * the exception is passed on to the caller
- * of <tt>DirectoryManager.getStateToBind()</tt>. The search for other factories
+ * of {@code DirectoryManager.getStateToBind()}. The search for other factories
  * that may produce a non-null answer is halted.
  * A factory should only throw an exception if it is sure that
  * it is the only intended factory and that no other factories
@@ -101,36 +101,36 @@
  * If this factory cannot create an object using the arguments supplied,
  * it should return null.
  * <p>
- * The <code>name</code> and <code>nameCtx</code> parameters may
+ * The {@code name} and {@code nameCtx} parameters may
  * optionally be used to specify the name of the object being created.
  * See the description of "Name and Context Parameters" in
  * {@link ObjectFactory#getObjectInstance ObjectFactory.getObjectInstance()}
  * for details.
- * If a factory uses <code>nameCtx</code> it should synchronize its use
+ * If a factory uses {@code nameCtx} it should synchronize its use
  * against concurrent access, since context implementations are not
  * guaranteed to be thread-safe.
  *<p>
- * The <tt>name</tt>, <tt>inAttrs</tt>, and <tt>environment</tt> parameters
+ * The {@code name}, {@code inAttrs}, and {@code environment} parameters
  * are owned by the caller.
  * The implementation will not modify these objects or keep references
  * to them, although it may keep references to clones or copies.
  * The object returned by this method is owned by the caller.
  * The implementation will not subsequently modify it.
- * It will contain either a new <tt>Attributes</tt> object that is
+ * It will contain either a new {@code Attributes} object that is
  * likewise owned by the caller, or a reference to the original
- * <tt>inAttrs</tt> parameter.
+ * {@code inAttrs} parameter.
  *
  * @param obj A possibly null object whose state is to be retrieved.
- * @param name The name of this object relative to <code>nameCtx</code>,
+ * @param name The name of this object relative to {@code nameCtx},
  *              or null if no name is specified.
- * @param nameCtx The context relative to which the <code>name</code>
- *              parameter is specified, or null if <code>name</code> is
+ * @param nameCtx The context relative to which the {@code name}
+ *              parameter is specified, or null if {@code name} is
  *              relative to the default initial context.
  * @param environment The possibly null environment to
  *              be used in the creation of the object's state.
  * @param inAttrs The possibly null attributes to be bound with the object.
- *      The factory must not modify <tt>inAttrs</tt>.
- * @return A <tt>Result</tt> containing the object's state for binding
+ *      The factory must not modify {@code inAttrs}.
+ * @return A {@code Result} containing the object's state for binding
  * and the corresponding
  * attributes to be bound; null if the object don't use this factory.
  * @exception NamingException If this factory encountered an exception
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java	Mon Aug 10 14:05:37 2015 +0300
@@ -41,18 +41,18 @@
 
 
 /**
-  * This class contains methods for supporting <tt>DirContext</tt>
+  * This class contains methods for supporting {@code DirContext}
   * implementations.
   *<p>
-  * This class is an extension of <tt>NamingManager</tt>.  It contains methods
+  * This class is an extension of {@code NamingManager}.  It contains methods
   * for use by service providers for accessing object factories and
   * state factories, and for getting continuation contexts for
   * supporting federation.
   *<p>
-  * <tt>DirectoryManager</tt> is safe for concurrent access by multiple threads.
+  * {@code DirectoryManager} is safe for concurrent access by multiple threads.
   *<p>
   * Except as otherwise noted,
-  * a <tt>Name</tt>, <tt>Attributes</tt>, or environment parameter
+  * a {@code Name}, {@code Attributes}, or environment parameter
   * passed to any method is owned by the caller.
   * The implementation will not modify the object or keep a reference
   * to it, although it may keep a reference to a clone or copy.
@@ -73,13 +73,13 @@
     DirectoryManager() {}
 
     /**
-      * Creates a context in which to continue a <tt>DirContext</tt> operation.
-      * Operates just like <tt>NamingManager.getContinuationContext()</tt>,
-      * only the continuation context returned is a <tt>DirContext</tt>.
+      * Creates a context in which to continue a {@code DirContext} operation.
+      * Operates just like {@code NamingManager.getContinuationContext()},
+      * only the continuation context returned is a {@code DirContext}.
       *
       * @param cpe
       *         The non-null exception that triggered this continuation.
-      * @return A non-null <tt>DirContext</tt> object for continuing the operation.
+      * @return A non-null {@code DirContext} object for continuing the operation.
       * @exception NamingException If a naming exception occurred.
       *
       * @see NamingManager#getContinuationContext(CannotProceedException)
@@ -104,37 +104,37 @@
       * Creates an instance of an object for the specified object,
       * attributes, and environment.
       * <p>
-      * This method is the same as <tt>NamingManager.getObjectInstance</tt>
+      * This method is the same as {@code NamingManager.getObjectInstance}
       * except for the following differences:
       *<ul>
       *<li>
-      * It accepts an <tt>Attributes</tt> parameter that contains attributes
-      * associated with the object. The <tt>DirObjectFactory</tt> might use these
+      * It accepts an {@code Attributes} parameter that contains attributes
+      * associated with the object. The {@code DirObjectFactory} might use these
       * attributes to save having to look them up from the directory.
       *<li>
       * The object factories tried must implement either
-      * <tt>ObjectFactory</tt> or <tt>DirObjectFactory</tt>.
-      * If it implements <tt>DirObjectFactory</tt>,
-      * <tt>DirObjectFactory.getObjectInstance()</tt> is used, otherwise,
-      * <tt>ObjectFactory.getObjectInstance()</tt> is used.
+      * {@code ObjectFactory} or {@code DirObjectFactory}.
+      * If it implements {@code DirObjectFactory},
+      * {@code DirObjectFactory.getObjectInstance()} is used, otherwise,
+      * {@code ObjectFactory.getObjectInstance()} is used.
       *</ul>
-      * Service providers that implement the <tt>DirContext</tt> interface
-      * should use this method, not <tt>NamingManager.getObjectInstance()</tt>.
+      * Service providers that implement the {@code DirContext} interface
+      * should use this method, not {@code NamingManager.getObjectInstance()}.
       *
       * @param refInfo The possibly null object for which to create an object.
-      * @param name The name of this object relative to <code>nameCtx</code>.
+      * @param name The name of this object relative to {@code nameCtx}.
       *         Specifying a name is optional; if it is
-      *         omitted, <code>name</code> should be null.
-      * @param nameCtx The context relative to which the <code>name</code>
-      *         parameter is specified.  If null, <code>name</code> is
+      *         omitted, {@code name} should be null.
+      * @param nameCtx The context relative to which the {@code name}
+      *         parameter is specified.  If null, {@code name} is
       *         relative to the default initial context.
       * @param environment The possibly null environment to
       *         be used in the creation of the object factory and the object.
       * @param attrs The possibly null attributes associated with refInfo.
       *         This might not be the complete set of attributes for refInfo;
       *         you might be able to read more attributes from the directory.
-      * @return An object created using <code>refInfo</code> and <tt>attrs</tt>; or
-      *         <code>refInfo</code> if an object cannot be created by
+      * @return An object created using {@code refInfo} and {@code attrs}; or
+      *         {@code refInfo} if an object cannot be created by
       *         a factory.
       * @exception NamingException If a naming exception was encountered
       *         while attempting to get a URL context, or if one of the
@@ -144,7 +144,7 @@
       *         and instantiating the factory and object classes.
       *         A factory should only throw an exception if it does not want
       *         other factories to be used in an attempt to create an object.
-      *         See <tt>DirObjectFactory.getObjectInstance()</tt>.
+      *         See {@code DirObjectFactory.getObjectInstance()}.
       * @see NamingManager#getURLContext
       * @see DirObjectFactory
       * @see DirObjectFactory#getObjectInstance
@@ -246,39 +246,39 @@
       * Retrieves the state of an object for binding when given the original
       * object and its attributes.
       * <p>
-      * This method is like <tt>NamingManager.getStateToBind</tt> except
+      * This method is like {@code NamingManager.getStateToBind} except
       * for the following differences:
       *<ul>
-      *<li>It accepts an <tt>Attributes</tt> parameter containing attributes
-      *    that were passed to the <tt>DirContext.bind()</tt> method.
-      *<li>It returns a non-null <tt>DirStateFactory.Result</tt> instance
+      *<li>It accepts an {@code Attributes} parameter containing attributes
+      *    that were passed to the {@code DirContext.bind()} method.
+      *<li>It returns a non-null {@code DirStateFactory.Result} instance
       *    containing the object to be bound, and the attributes to
       *    accompany the binding. Either the object or the attributes may be null.
       *<li>
       * The state factories tried must each implement either
-      * <tt>StateFactory</tt> or <tt>DirStateFactory</tt>.
-      * If it implements <tt>DirStateFactory</tt>, then
-      * <tt>DirStateFactory.getStateToBind()</tt> is called; otherwise,
-      * <tt>StateFactory.getStateToBind()</tt> is called.
+      * {@code StateFactory} or {@code DirStateFactory}.
+      * If it implements {@code DirStateFactory}, then
+      * {@code DirStateFactory.getStateToBind()} is called; otherwise,
+      * {@code StateFactory.getStateToBind()} is called.
       *</ul>
       *
-      * Service providers that implement the <tt>DirContext</tt> interface
-      * should use this method, not <tt>NamingManager.getStateToBind()</tt>.
+      * Service providers that implement the {@code DirContext} interface
+      * should use this method, not {@code NamingManager.getStateToBind()}.
       *<p>
       * See NamingManager.getStateToBind() for a description of how
       * the list of state factories to be tried is determined.
       *<p>
       * The object returned by this method is owned by the caller.
       * The implementation will not subsequently modify it.
-      * It will contain either a new <tt>Attributes</tt> object that is
+      * It will contain either a new {@code Attributes} object that is
       * likewise owned by the caller, or a reference to the original
-      * <tt>attrs</tt> parameter.
+      * {@code attrs} parameter.
       *
       * @param obj The non-null object for which to get state to bind.
-      * @param name The name of this object relative to <code>nameCtx</code>,
+      * @param name The name of this object relative to {@code nameCtx},
       *         or null if no name is specified.
-      * @param nameCtx The context relative to which the <code>name</code>
-      *         parameter is specified, or null if <code>name</code> is
+      * @param nameCtx The context relative to which the {@code name}
+      *         parameter is specified, or null if {@code name} is
       *         relative to the default initial context.
       * @param environment The possibly null environment to
       *         be used in the creation of the state factory and
@@ -288,12 +288,12 @@
       * @return A non-null DirStateFactory.Result containing
       *  the object and attributes to be bound.
       *  If no state factory returns a non-null answer, the result will contain
-      *  the object (<tt>obj</tt>) itself with the original attributes.
+      *  the object ({@code obj}) itself with the original attributes.
       * @exception NamingException If a naming exception was encountered
       *         while using the factories.
       *         A factory should only throw an exception if it does not want
       *         other factories to be used in an attempt to create an object.
-      *         See <tt>DirStateFactory.getStateToBind()</tt>.
+      *         See {@code DirStateFactory.getStateToBind()}.
       * @see DirStateFactory
       * @see DirStateFactory#getStateToBind
       * @see NamingManager#getStateToBind
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/NamingManager.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/NamingManager.java	Mon Aug 10 14:05:37 2015 +0300
@@ -49,7 +49,7 @@
  * NamingManager is safe for concurrent access by multiple threads.
  *<p>
  * Except as otherwise noted,
- * a <tt>Name</tt> or environment parameter
+ * a {@code Name} or environment parameter
  * passed to any method is owned by the caller.
  * The implementation will not modify the object or keep a reference
  * to it, although it may keep a reference to a clone or copy.
@@ -164,8 +164,8 @@
 
     /**
      * Creates an object using the factories specified in the
-     * <tt>Context.OBJECT_FACTORIES</tt> property of the environment
-     * or of the provider resource file associated with <tt>nameCtx</tt>.
+     * {@code Context.OBJECT_FACTORIES} property of the environment
+     * or of the provider resource file associated with {@code nameCtx}.
      *
      * @return factory created; null if cannot create
      */
@@ -205,69 +205,69 @@
      * create a factory for creating the object.
      * Otherwise, the following rules are used to create the object:
      *<ol>
-     * <li>If <code>refInfo</code> is a <code>Reference</code>
-     *    or <code>Referenceable</code> containing a factory class name,
+     * <li>If {@code refInfo} is a {@code Reference}
+     *    or {@code Referenceable} containing a factory class name,
      *    use the named factory to create the object.
-     *    Return <code>refInfo</code> if the factory cannot be created.
+     *    Return {@code refInfo} if the factory cannot be created.
      *    Under JDK 1.1, if the factory class must be loaded from a location
-     *    specified in the reference, a <tt>SecurityManager</tt> must have
+     *    specified in the reference, a {@code SecurityManager} must have
      *    been installed or the factory creation will fail.
      *    If an exception is encountered while creating the factory,
      *    it is passed up to the caller.
-     * <li>If <tt>refInfo</tt> is a <tt>Reference</tt> or
-     *    <tt>Referenceable</tt> with no factory class name,
-     *    and the address or addresses are <tt>StringRefAddr</tt>s with
+     * <li>If {@code refInfo} is a {@code Reference} or
+     *    {@code Referenceable} with no factory class name,
+     *    and the address or addresses are {@code StringRefAddr}s with
      *    address type "URL",
      *    try the URL context factory corresponding to each URL's scheme id
-     *    to create the object (see <tt>getURLContext()</tt>).
+     *    to create the object (see {@code getURLContext()}).
      *    If that fails, continue to the next step.
      * <li> Use the object factories specified in
-     *    the <tt>Context.OBJECT_FACTORIES</tt> property of the environment,
+     *    the {@code Context.OBJECT_FACTORIES} property of the environment,
      *    and of the provider resource file associated with
-     *    <tt>nameCtx</tt>, in that order.
+     *    {@code nameCtx}, in that order.
      *    The value of this property is a colon-separated list of factory
      *    class names that are tried in order, and the first one that succeeds
      *    in creating an object is the one used.
      *    If none of the factories can be loaded,
-     *    return <code>refInfo</code>.
+     *    return {@code refInfo}.
      *    If an exception is encountered while creating the object, the
      *    exception is passed up to the caller.
      *</ol>
      *<p>
-     * Service providers that implement the <tt>DirContext</tt>
+     * Service providers that implement the {@code DirContext}
      * interface should use
-     * <tt>DirectoryManager.getObjectInstance()</tt>, not this method.
-     * Service providers that implement only the <tt>Context</tt>
+     * {@code DirectoryManager.getObjectInstance()}, not this method.
+     * Service providers that implement only the {@code Context}
      * interface should use this method.
      * <p>
      * Note that an object factory (an object that implements the ObjectFactory
      * interface) must be public and must have a public constructor that
      * accepts no arguments.
      * <p>
-     * The <code>name</code> and <code>nameCtx</code> parameters may
+     * The {@code name} and {@code nameCtx} parameters may
      * optionally be used to specify the name of the object being created.
-     * <code>name</code> is the name of the object, relative to context
-     * <code>nameCtx</code>.  This information could be useful to the object
+     * {@code name} is the name of the object, relative to context
+     * {@code nameCtx}.  This information could be useful to the object
      * factory or to the object implementation.
      *  If there are several possible contexts from which the object
      *  could be named -- as will often be the case -- it is up to
      *  the caller to select one.  A good rule of thumb is to select the
      * "deepest" context available.
-     * If <code>nameCtx</code> is null, <code>name</code> is relative
+     * If {@code nameCtx} is null, {@code name} is relative
      * to the default initial context.  If no name is being specified, the
-     * <code>name</code> parameter should be null.
+     * {@code name} parameter should be null.
      *
      * @param refInfo The possibly null object for which to create an object.
-     * @param name The name of this object relative to <code>nameCtx</code>.
+     * @param name The name of this object relative to {@code nameCtx}.
      *          Specifying a name is optional; if it is
-     *          omitted, <code>name</code> should be null.
-     * @param nameCtx The context relative to which the <code>name</code>
-     *          parameter is specified.  If null, <code>name</code> is
+     *          omitted, {@code name} should be null.
+     * @param nameCtx The context relative to which the {@code name}
+     *          parameter is specified.  If null, {@code name} is
      *          relative to the default initial context.
      * @param environment The possibly null environment to
      *          be used in the creation of the object factory and the object.
-     * @return An object created using <code>refInfo</code>; or
-     *          <code>refInfo</code> if an object cannot be created using
+     * @return An object created using {@code refInfo}; or
+     *          {@code refInfo} if an object cannot be created using
      *          the algorithm described above.
      * @exception NamingException if a naming exception was encountered
      *  while attempting to get a URL context, or if one of the
@@ -404,23 +404,23 @@
 
 
     /**
-     * Retrieves a context identified by <code>obj</code>, using the specified
+     * Retrieves a context identified by {@code obj}, using the specified
      * environment.
      * Used by ContinuationContext.
      *
      * @param obj       The object identifying the context.
      * @param name      The name of the context being returned, relative to
-     *                  <code>nameCtx</code>, or null if no name is being
+     *                  {@code nameCtx}, or null if no name is being
      *                  specified.
-     *                  See the <code>getObjectInstance</code> method for
+     *                  See the {@code getObjectInstance} method for
      *                  details.
-     * @param nameCtx   The context relative to which <code>name</code> is
+     * @param nameCtx   The context relative to which {@code name} is
      *                  specified, or null for the default initial context.
-     *                  See the <code>getObjectInstance</code> method for
+     *                  See the {@code getObjectInstance} method for
      *                  details.
      * @param environment Environment specifying characteristics of the
      *                  resulting context.
-     * @return A context identified by <code>obj</code>.
+     * @return A context identified by {@code obj}.
      *
      * @see #getObjectInstance
      */
@@ -480,7 +480,7 @@
      * Creates a context for the given URL scheme id.
      * <p>
      * The resulting context is for resolving URLs of the
-     * scheme <code>scheme</code>. The resulting context is not tied
+     * scheme {@code scheme}. The resulting context is not tied
      * to a specific URL. It is able to handle arbitrary URLs with
      * the specified scheme.
      *<p>
@@ -488,7 +488,7 @@
      * has the naming convention <i>scheme-id</i>URLContextFactory
      * (e.g. "ftpURLContextFactory" for the "ftp" scheme-id),
      * in the package specified as follows.
-     * The <tt>Context.URL_PKG_PREFIXES</tt> environment property (which
+     * The {@code Context.URL_PKG_PREFIXES} environment property (which
      * may contain values taken from system properties,
      * or application resource files)
      * contains a colon-separated list of package prefixes.
@@ -500,7 +500,7 @@
      * concatenated with the scheme id.
      *<p>
      * For example, if the scheme id is "ldap", and the
-     * <tt>Context.URL_PKG_PREFIXES</tt> property
+     * {@code Context.URL_PKG_PREFIXES} property
      * contains "com.widget:com.wiz.jndi",
      * the naming manager would attempt to load the following classes
      * until one is successfully instantiated:
@@ -514,7 +514,7 @@
      * If a factory is instantiated, it is invoked with the following
      * parameters to produce the resulting context.
      * <p>
-     * <code>factory.getObjectInstance(null, environment);</code>
+     * {@code factory.getObjectInstance(null, environment);}
      * <p>
      * For example, invoking getObjectInstance() as shown above
      * on a LDAP URL context factory would return a
@@ -530,8 +530,8 @@
      * @param environment The possibly null environment properties to be
      *           used in the creation of the object factory and the context.
      * @return A context for resolving URLs with the
-     *         scheme id <code>scheme</code>;
-     *  <code>null</code> if the factory for creating the
+     *         scheme id {@code scheme};
+     *  {@code null} if the factory for creating the
      *         context is not found.
      * @exception NamingException If a naming exception occurs while creating
      *          the context.
@@ -575,7 +575,7 @@
      * context factory for the URL scheme.
      * @param scheme the URL scheme id for the context
      * @param urlInfo information used to create the context
-     * @param name name of this object relative to <code>nameCtx</code>
+     * @param name name of this object relative to {@code nameCtx}
      * @param nameCtx Context whose provider resource file will be searched
      *          for package prefix values (or null if none)
      * @param environment Environment properties for creating the context
@@ -630,7 +630,7 @@
      *     it is used to create the factory for creating the initial
      *     context</li>
      * <li>Otherwise, the class specified in the
-     *     <tt>Context.INITIAL_CONTEXT_FACTORY</tt> environment property
+     *     {@code Context.INITIAL_CONTEXT_FACTORY} environment property
      *     is used
      *     <ul>
      *     <li>First, the {@linkplain java.util.ServiceLoader ServiceLoader}
@@ -649,7 +649,7 @@
      *                  creating the context.
      * @return A non-null initial context.
      * @exception NoInitialContextException If the
-     *          <tt>Context.INITIAL_CONTEXT_FACTORY</tt> property
+     *          {@code Context.INITIAL_CONTEXT_FACTORY} property
      *         is not found or names a nonexistent
      *         class or a class that cannot be instantiated,
      *          or if the initial context could not be created for some other
@@ -764,8 +764,8 @@
 
     /**
      * Constant that holds the name of the environment property into
-     * which <tt>getContinuationContext()</tt> stores the value of its
-     * <tt>CannotProceedException</tt> parameter.
+     * which {@code getContinuationContext()} stores the value of its
+     * {@code CannotProceedException} parameter.
      * This property is inherited by the continuation context, and may
      * be used by that context's service provider to inspect the
      * fields of the exception.
@@ -784,18 +784,18 @@
      * namespaces, a context from one naming system may need to pass
      * the operation on to the next naming system.  The context
      * implementation does this by first constructing a
-     * <code>CannotProceedException</code> containing information
+     * {@code CannotProceedException} containing information
      * pinpointing how far it has proceeded.  It then obtains a
      * continuation context from JNDI by calling
-     * <code>getContinuationContext</code>.  The context
+     * {@code getContinuationContext}.  The context
      * implementation should then resume the context operation by
      * invoking the same operation on the continuation context, using
      * the remainder of the name that has not yet been resolved.
      *<p>
-     * Before making use of the <tt>cpe</tt> parameter, this method
+     * Before making use of the {@code cpe} parameter, this method
      * updates the environment associated with that object by setting
-     * the value of the property <a href="#CPE"><tt>CPE</tt></a>
-     * to <tt>cpe</tt>.  This property will be inherited by the
+     * the value of the property <a href="#CPE">{@code CPE}</a>
+     * to {@code cpe}.  This property will be inherited by the
      * continuation context, and may be used by that context's
      * service provider to inspect the fields of this exception.
      *
@@ -826,15 +826,15 @@
     /**
      * Retrieves the state of an object for binding.
      * <p>
-     * Service providers that implement the <tt>DirContext</tt> interface
-     * should use <tt>DirectoryManager.getStateToBind()</tt>, not this method.
-     * Service providers that implement only the <tt>Context</tt> interface
+     * Service providers that implement the {@code DirContext} interface
+     * should use {@code DirectoryManager.getStateToBind()}, not this method.
+     * Service providers that implement only the {@code Context} interface
      * should use this method.
      *<p>
      * This method uses the specified state factories in
-     * the <tt>Context.STATE_FACTORIES</tt> property from the environment
+     * the {@code Context.STATE_FACTORIES} property from the environment
      * properties, and from the provider resource file associated with
-     * <tt>nameCtx</tt>, in that order.
+     * {@code nameCtx}, in that order.
      *    The value of this property is a colon-separated list of factory
      *    class names that are tried in order, and the first one that succeeds
      *    in returning the object's state is the one used.
@@ -848,35 +848,35 @@
      * interface) must be public and must have a public constructor that
      * accepts no arguments.
      * <p>
-     * The <code>name</code> and <code>nameCtx</code> parameters may
+     * The {@code name} and {@code nameCtx} parameters may
      * optionally be used to specify the name of the object being created.
      * See the description of "Name and Context Parameters" in
      * {@link ObjectFactory#getObjectInstance
      *          ObjectFactory.getObjectInstance()}
      * for details.
      * <p>
-     * This method may return a <tt>Referenceable</tt> object.  The
+     * This method may return a {@code Referenceable} object.  The
      * service provider obtaining this object may choose to store it
      * directly, or to extract its reference (using
-     * <tt>Referenceable.getReference()</tt>) and store that instead.
+     * {@code Referenceable.getReference()}) and store that instead.
      *
      * @param obj The non-null object for which to get state to bind.
-     * @param name The name of this object relative to <code>nameCtx</code>,
+     * @param name The name of this object relative to {@code nameCtx},
      *          or null if no name is specified.
-     * @param nameCtx The context relative to which the <code>name</code>
-     *          parameter is specified, or null if <code>name</code> is
+     * @param nameCtx The context relative to which the {@code name}
+     *          parameter is specified, or null if {@code name} is
      *          relative to the default initial context.
      *  @param environment The possibly null environment to
      *          be used in the creation of the state factory and
      *  the object's state.
-     * @return The non-null object representing <tt>obj</tt>'s state for
-     *  binding.  It could be the object (<tt>obj</tt>) itself.
+     * @return The non-null object representing {@code obj}'s state for
+     *  binding.  It could be the object ({@code obj}) itself.
      * @exception NamingException If one of the factories accessed throws an
      *          exception, or if an error was encountered while loading
      *          and instantiating the factory and object classes.
      *          A factory should only throw an exception if it does not want
      *          other factories to be used in an attempt to create an object.
-     *  See <tt>StateFactory.getStateToBind()</tt>.
+     *  See {@code StateFactory.getStateToBind()}.
      * @see StateFactory
      * @see StateFactory#getStateToBind
      * @see DirectoryManager#getStateToBind
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java	Mon Aug 10 14:05:37 2015 +0300
@@ -39,15 +39,15 @@
   * Reference could be used to create a printer object, so that
   * the caller of lookup can directly operate on the printer object
   * after the lookup.
-  * <p>An <tt>ObjectFactory</tt> is responsible
+  * <p>An {@code ObjectFactory} is responsible
   * for creating objects of a specific type.  In the above example,
   * you may have a PrinterObjectFactory for creating Printer objects.
   *<p>
-  * An object factory must implement the <tt>ObjectFactory</tt> interface.
+  * An object factory must implement the {@code ObjectFactory} interface.
   * In addition, the factory class must be public and must have a
   * public constructor that accepts no parameters.
   *<p>
-  * The <tt>getObjectInstance()</tt> method of an object factory may
+  * The {@code getObjectInstance()} method of an object factory may
   * be invoked multiple times, possibly using different parameters.
   * The implementation is thread-safe.
   *<p>
@@ -73,15 +73,15 @@
  * specified.
  * <p>
  * Special requirements of this object are supplied
- * using <code>environment</code>.
+ * using {@code environment}.
  * An example of such an environment property is user identity
  * information.
  *<p>
- * <tt>NamingManager.getObjectInstance()</tt>
+ * {@code NamingManager.getObjectInstance()}
  * successively loads in object factories and invokes this method
  * on them until one produces a non-null answer.  When an exception
  * is thrown by an object factory, the exception is passed on to the caller
- * of <tt>NamingManager.getObjectInstance()</tt>
+ * of {@code NamingManager.getObjectInstance()}
  * (and no search is made for other factories
  * that may produce a non-null answer).
  * An object factory should only throw an exception if it is sure that
@@ -92,27 +92,27 @@
  *<p>
  * A <em>URL context factory</em> is a special ObjectFactory that
  * creates contexts for resolving URLs or objects whose locations
- * are specified by URLs.  The <tt>getObjectInstance()</tt> method
+ * are specified by URLs.  The {@code getObjectInstance()} method
  * of a URL context factory will obey the following rules.
  * <ol>
- * <li>If <code>obj</code> is null, create a context for resolving URLs of the
+ * <li>If {@code obj} is null, create a context for resolving URLs of the
  * scheme associated with this factory. The resulting context is not tied
  * to a specific URL:  it is able to handle arbitrary URLs with this factory's
- * scheme id.  For example, invoking <tt>getObjectInstance()</tt> with
- * <code>obj</code> set to null on an LDAP URL context factory would return a
+ * scheme id.  For example, invoking {@code getObjectInstance()} with
+ * {@code obj} set to null on an LDAP URL context factory would return a
  * context that can resolve LDAP URLs
  * such as "ldap://ldap.wiz.com/o=wiz,c=us" and
  * "ldap://ldap.umich.edu/o=umich,c=us".
  * <li>
- * If <code>obj</code> is a URL string, create an object (typically a context)
+ * If {@code obj} is a URL string, create an object (typically a context)
  * identified by the URL.  For example, suppose this is an LDAP URL context
- * factory.  If <code>obj</code> is "ldap://ldap.wiz.com/o=wiz,c=us",
+ * factory.  If {@code obj} is "ldap://ldap.wiz.com/o=wiz,c=us",
  * getObjectInstance() would return the context named by the distinguished
  * name "o=wiz, c=us" at the LDAP server ldap.wiz.com.  This context can
  * then be used to resolve LDAP names (such as "cn=George")
  * relative to that context.
  * <li>
- * If <code>obj</code> is an array of URL strings, the assumption is that the
+ * If {@code obj} is an array of URL strings, the assumption is that the
  * URLs are equivalent in terms of the context to which they refer.
  * Verification of whether the URLs are, or need to be, equivalent is up
  * to the context factory. The order of the URLs in the array is
@@ -120,13 +120,13 @@
  * The object returned by getObjectInstance() is like that of the single
  * URL case.  It is the object named by the URLs.
  * <li>
- * If <code>obj</code> is of any other type, the behavior of
- * <tt>getObjectInstance()</tt> is determined by the context factory
+ * If {@code obj} is of any other type, the behavior of
+ * {@code getObjectInstance()} is determined by the context factory
  * implementation.
  * </ol>
  *
  * <p>
- * The <tt>name</tt> and <tt>environment</tt> parameters
+ * The {@code name} and {@code environment} parameters
  * are owned by the caller.
  * The implementation will not modify these objects or keep references
  * to them, although it may keep references to clones or copies.
@@ -135,27 +135,27 @@
  * <b>Name and Context Parameters.</b> &nbsp;&nbsp;&nbsp;
  * <a name=NAMECTX></a>
  *
- * The <code>name</code> and <code>nameCtx</code> parameters may
+ * The {@code name} and {@code nameCtx} parameters may
  * optionally be used to specify the name of the object being created.
- * <code>name</code> is the name of the object, relative to context
- * <code>nameCtx</code>.
+ * {@code name} is the name of the object, relative to context
+ * {@code nameCtx}.
  * If there are several possible contexts from which the object
  * could be named -- as will often be the case -- it is up to
  * the caller to select one.  A good rule of thumb is to select the
  * "deepest" context available.
- * If <code>nameCtx</code> is null, <code>name</code> is relative
+ * If {@code nameCtx} is null, {@code name} is relative
  * to the default initial context.  If no name is being specified, the
- * <code>name</code> parameter should be null.
- * If a factory uses <code>nameCtx</code> it should synchronize its use
+ * {@code name} parameter should be null.
+ * If a factory uses {@code nameCtx} it should synchronize its use
  * against concurrent access, since context implementations are not
  * guaranteed to be thread-safe.
  *
  * @param obj The possibly null object containing location or reference
  *              information that can be used in creating an object.
- * @param name The name of this object relative to <code>nameCtx</code>,
+ * @param name The name of this object relative to {@code nameCtx},
  *              or null if no name is specified.
- * @param nameCtx The context relative to which the <code>name</code>
- *              parameter is specified, or null if <code>name</code> is
+ * @param nameCtx The context relative to which the {@code name}
+ *              parameter is specified, or null if {@code name} is
  *              relative to the default initial context.
  * @param environment The possibly null environment that is used in
  *              creating the object.
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java	Mon Aug 10 14:05:37 2015 +0300
@@ -40,10 +40,10 @@
   * after the lookup.  An ObjectFactory is responsible for creating
   * objects of a specific type.  JNDI uses a default policy for using
   * and loading object factories.  You can override this default policy
-  * by calling <tt>NamingManager.setObjectFactoryBuilder()</tt> with an ObjectFactoryBuilder,
+  * by calling {@code NamingManager.setObjectFactoryBuilder()} with an ObjectFactoryBuilder,
   * which contains the program-defined way of creating/loading
   * object factories.
-  * Any <tt>ObjectFactoryBuilder</tt> implementation must implement this
+  * Any {@code ObjectFactoryBuilder} implementation must implement this
   * interface that for creating object factories.
   *
   * @author Rosanna Lee
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/Resolver.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/Resolver.java	Mon Aug 10 14:05:37 2015 +0300
@@ -37,10 +37,10 @@
   * that do not support subtypes of Context, but which can act as
   * intermediate contexts for resolution purposes.
   *<p>
-  * A <tt>Name</tt> parameter passed to any method is owned
+  * A {@code Name} parameter passed to any method is owned
   * by the caller.  The service provider will not modify the object
   * or keep a reference to it.
-  * A <tt>ResolveResult</tt> object returned by any
+  * A {@code ResolveResult} object returned by any
   * method is owned by the caller.  The caller may subsequently modify it;
   * the service provider may not.
   *
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/StateFactory.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/StateFactory.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,14 +34,14 @@
   * The JNDI framework allows for object implementations to
   * be loaded in dynamically via <em>object factories</em>.
   * For example, when looking up a printer bound in the name space,
-  * if the print service binds printer names to <tt>Reference</tt>s, the printer
-  * <tt>Reference</tt> could be used to create a printer object, so that
+  * if the print service binds printer names to {@code Reference}s, the printer
+  * {@code Reference} could be used to create a printer object, so that
   * the caller of lookup can directly operate on the printer object
   * after the lookup.
-  * <p>An <tt>ObjectFactory</tt> is responsible
+  * <p>An {@code ObjectFactory} is responsible
   * for creating objects of a specific type.  In the above example,
-  * you may have a <tt>PrinterObjectFactory</tt> for creating
-  * <tt>Printer</tt> objects.
+  * you may have a {@code PrinterObjectFactory} for creating
+  * {@code Printer} objects.
   * <p>
   * For the reverse process, when an object is bound into the namespace,
   * JNDI provides <em>state factories</em>.
@@ -50,23 +50,23 @@
   * <blockquote><pre>
   * ctx.rebind("inky", printer);
   * </pre></blockquote>
-  * The service provider for <tt>ctx</tt> uses a state factory
-  * to obtain the state of <tt>printer</tt> for binding into its namespace.
-  * A state factory for the <tt>Printer</tt> type object might return
+  * The service provider for {@code ctx} uses a state factory
+  * to obtain the state of {@code printer} for binding into its namespace.
+  * A state factory for the {@code Printer} type object might return
   * a more compact object for storage in the naming system.
   *<p>
-  * A state factory must implement the <tt>StateFactory</tt> interface.
+  * A state factory must implement the {@code StateFactory} interface.
   * In addition, the factory class must be public and must have a
   * public constructor that accepts no parameters.
   *<p>
-  * The <tt>getStateToBind()</tt> method of a state factory may
+  * The {@code getStateToBind()} method of a state factory may
   * be invoked multiple times, possibly using different parameters.
   * The implementation is thread-safe.
   *<p>
-  * <tt>StateFactory</tt> is intended for use with service providers
-  * that implement only the <tt>Context</tt> interface.
-  * <tt>DirStateFactory</tt> is intended for use with service providers
-  * that implement the <tt>DirContext</tt> interface.
+  * {@code StateFactory} is intended for use with service providers
+  * that implement only the {@code Context} interface.
+  * {@code DirStateFactory} is intended for use with service providers
+  * that implement the {@code DirContext} interface.
   *
   * @author Rosanna Lee
   * @author Scott Seligman
@@ -81,18 +81,18 @@
 /**
  * Retrieves the state of an object for binding.
  *<p>
- * <tt>NamingManager.getStateToBind()</tt>
+ * {@code NamingManager.getStateToBind()}
  * successively loads in state factories and invokes this method
  * on them until one produces a non-null answer.
- * <tt>DirectoryManager.getStateToBind()</tt>
+ * {@code DirectoryManager.getStateToBind()}
  * successively loads in state factories.  If a factory implements
- * <tt>DirStateFactory</tt>, then <tt>DirectoryManager</tt>
- * invokes <tt>DirStateFactory.getStateToBind()</tt>; otherwise
- * it invokes <tt>StateFactory.getStateToBind()</tt>.
+ * {@code DirStateFactory}, then {@code DirectoryManager}
+ * invokes {@code DirStateFactory.getStateToBind()}; otherwise
+ * it invokes {@code StateFactory.getStateToBind()}.
  *<p> When an exception
  * is thrown by a factory, the exception is passed on to the caller
- * of <tt>NamingManager.getStateToBind()</tt> and
- * <tt>DirectoryManager.getStateToBind()</tt>.
+ * of {@code NamingManager.getStateToBind()} and
+ * {@code DirectoryManager.getStateToBind()}.
  * The search for other factories
  * that may produce a non-null answer is halted.
  * A factory should only throw an exception if it is sure that
@@ -110,7 +110,7 @@
  * against concurrent access, since context implementations are not
  * guaranteed to be thread-safe.
  * <p>
- * The <tt>name</tt> and <tt>environment</tt> parameters
+ * The {@code name} and {@code environment} parameters
  * are owned by the caller.
  * The implementation will not modify these objects or keep references
  * to them, although it may keep references to clones or copies.
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/package.html	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/package.html	Mon Aug 10 14:05:37 2015 +0300
@@ -29,7 +29,7 @@
 <body bgcolor="white">
 
 Provides the means for dynamically plugging in support for accessing
-naming and directory services through the <tt>javax.naming</tt> 
+naming and directory services through the <code>javax.naming</code>
 and related packages.
 
 <p>
@@ -58,9 +58,9 @@
 
 <h4>Java Object Support</h4>
 
-The service provider package provides support 
+The service provider package provides support
 for implementors of the
-<tt>javax.naming.Context.lookup()</tt> 
+<code>javax.naming.Context.lookup()</code>
 method and related methods to return Java objects that are natural
 and intuitive for the Java programmer.
 For example, when looking up a printer name from the directory,
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java	Mon Aug 10 14:05:37 2015 +0300
@@ -40,8 +40,8 @@
  * This class provides a skeletal implementation of the {@link Preferences}
  * class, greatly easing the task of implementing it.
  *
- * <p><strong>This class is for <tt>Preferences</tt> implementers only.
- * Normal users of the <tt>Preferences</tt> facility should have no need to
+ * <p><strong>This class is for {@code Preferences} implementers only.
+ * Normal users of the {@code Preferences} facility should have no need to
  * consult this documentation.  The {@link Preferences} documentation
  * should suffice.</strong>
  *
@@ -56,11 +56,11 @@
  * performance.
  *
  * <p>The SPI methods fall into three groups concerning exception
- * behavior. The <tt>getSpi</tt> method should never throw exceptions, but it
+ * behavior. The {@code getSpi} method should never throw exceptions, but it
  * doesn't really matter, as any exception thrown by this method will be
  * intercepted by {@link #get(String,String)}, which will return the specified
- * default value to the caller.  The <tt>removeNodeSpi, keysSpi,
- * childrenNamesSpi, syncSpi</tt> and <tt>flushSpi</tt> methods are specified
+ * default value to the caller.  The {@code removeNodeSpi, keysSpi,
+ * childrenNamesSpi, syncSpi} and {@code flushSpi} methods are specified
  * to throw {@link BackingStoreException}, and the implementation is required
  * to throw this checked exception if it is unable to perform the operation.
  * The exception propagates outward, causing the corresponding API method
@@ -69,7 +69,7 @@
  * <p>The remaining SPI methods {@link #putSpi(String,String)}, {@link
  * #removeSpi(String)} and {@link #childSpi(String)} have more complicated
  * exception behavior.  They are not specified to throw
- * <tt>BackingStoreException</tt>, as they can generally obey their contracts
+ * {@code BackingStoreException}, as they can generally obey their contracts
  * even if the backing store is unavailable.  This is true because they return
  * no information and their effects are not required to become permanent until
  * a subsequent call to {@link Preferences#flush()} or
@@ -79,11 +79,11 @@
  * later processing.  Even under these circumstances it is generally better to
  * simply ignore the invocation and return, rather than throwing an
  * exception.  Under these circumstances, however, subsequently invoking
- * <tt>flush()</tt> or <tt>sync</tt> would not imply that all previous
+ * {@code flush()} or {@code sync} would not imply that all previous
  * operations had successfully been made permanent.
  *
- * <p>There is one circumstance under which <tt>putSpi, removeSpi and
- * childSpi</tt> <i>should</i> throw an exception: if the caller lacks
+ * <p>There is one circumstance under which {@code putSpi, removeSpi and
+ * childSpi} <i>should</i> throw an exception: if the caller lacks
  * sufficient privileges on the underlying operating system to perform the
  * requested operation.  This will, for instance, occur on most systems
  * if a non-privileged user attempts to modify system preferences.
@@ -103,18 +103,18 @@
  * backing store.  It is the implementation's responsibility to recreate the
  * node if it has been deleted.
  *
- * <p>Implementation note: In Sun's default <tt>Preferences</tt>
+ * <p>Implementation note: In Sun's default {@code Preferences}
  * implementations, the user's identity is inherited from the underlying
  * operating system and does not change for the lifetime of the virtual
- * machine.  It is recognized that server-side <tt>Preferences</tt>
+ * machine.  It is recognized that server-side {@code Preferences}
  * implementations may have the user identity change from request to request,
- * implicitly passed to <tt>Preferences</tt> methods via the use of a
+ * implicitly passed to {@code Preferences} methods via the use of a
  * static {@link ThreadLocal} instance.  Authors of such implementations are
  * <i>strongly</i> encouraged to determine the user at the time preferences
  * are accessed (for example by the {@link #get(String,String)} or {@link
  * #put(String,String)} method) rather than permanently associating a user
- * with each <tt>Preferences</tt> instance.  The latter behavior conflicts
- * with normal <tt>Preferences</tt> usage and would lead to great confusion.
+ * with each {@code Preferences} instance.  The latter behavior conflicts
+ * with normal {@code Preferences} usage and would lead to great confusion.
  *
  * @author  Josh Bloch
  * @see     Preferences
@@ -149,7 +149,7 @@
     private final AbstractPreferences root; // Relative to this node
 
     /**
-     * This field should be <tt>true</tt> if this node did not exist in the
+     * This field should be {@code true} if this node did not exist in the
      * backing store prior to the creation of this object.  The field
      * is initialized to false, but may be set to true by a subclass
      * constructor (and should not be modified thereafter).  This field
@@ -197,10 +197,10 @@
      * @param parent the parent of this preference node, or null if this
      *               is the root.
      * @param name the name of this preference node, relative to its parent,
-     *             or <tt>""</tt> if this is the root.
-     * @throws IllegalArgumentException if <tt>name</tt> contains a slash
-     *          (<tt>'/'</tt>),  or <tt>parent</tt> is <tt>null</tt> and
-     *          name isn't <tt>""</tt>.
+     *             or {@code ""} if this is the root.
+     * @throws IllegalArgumentException if {@code name} contains a slash
+     *          ({@code '/'}),  or {@code parent} is {@code null} and
+     *          name isn't {@code ""}.
      */
     protected AbstractPreferences(AbstractPreferences parent, String name) {
         if (parent==null) {
@@ -225,7 +225,7 @@
     }
 
     /**
-     * Implements the <tt>put</tt> method as per the specification in
+     * Implements the {@code put} method as per the specification in
      * {@link Preferences#put(String,String)}.
      *
      * <p>This implementation checks that the key and value are legal,
@@ -236,10 +236,10 @@
      *
      * @param key key with which the specified value is to be associated.
      * @param value value to be associated with the specified key.
-     * @throws NullPointerException if key or value is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *       <tt>MAX_KEY_LENGTH</tt> or if <tt>value.length</tt> exceeds
-     *       <tt>MAX_VALUE_LENGTH</tt>.
+     * @throws NullPointerException if key or value is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *       {@code MAX_KEY_LENGTH} or if {@code value.length} exceeds
+     *       {@code MAX_VALUE_LENGTH}.
      * @throws IllegalArgumentException if either key or value contain
      *         the null control character, code point U+0000.
      * @throws IllegalStateException if this node (or an ancestor) has been
@@ -267,26 +267,26 @@
     }
 
     /**
-     * Implements the <tt>get</tt> method as per the specification in
+     * Implements the {@code get} method as per the specification in
      * {@link Preferences#get(String,String)}.
      *
-     * <p>This implementation first checks to see if <tt>key</tt> is
-     * <tt>null</tt> throwing a <tt>NullPointerException</tt> if this is
+     * <p>This implementation first checks to see if {@code key} is
+     * {@code null} throwing a {@code NullPointerException} if this is
      * the case.  Then it obtains this preference node's lock,
      * checks that the node has not been removed, invokes {@link
-     * #getSpi(String)}, and returns the result, unless the <tt>getSpi</tt>
-     * invocation returns <tt>null</tt> or throws an exception, in which case
-     * this invocation returns <tt>def</tt>.
+     * #getSpi(String)}, and returns the result, unless the {@code getSpi}
+     * invocation returns {@code null} or throws an exception, in which case
+     * this invocation returns {@code def}.
      *
      * @param key key whose associated value is to be returned.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>.
-     * @return the value associated with <tt>key</tt>, or <tt>def</tt>
-     *         if no value is associated with <tt>key</tt>.
+     *        preference node has no value associated with {@code key}.
+     * @return the value associated with {@code key}, or {@code def}
+     *         if no value is associated with {@code key}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if key is <tt>null</tt>.  (A
-     *         <tt>null</tt> default <i>is</i> permitted.)
+     * @throws NullPointerException if key is {@code null}.  (A
+     *         {@code null} default <i>is</i> permitted.)
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      */
@@ -310,7 +310,7 @@
     }
 
     /**
-     * Implements the <tt>remove(String)</tt> method as per the specification
+     * Implements the {@code remove(String)} method as per the specification
      * in {@link Preferences#remove(String)}.
      *
      * <p>This implementation obtains this preference node's lock,
@@ -340,7 +340,7 @@
     }
 
     /**
-     * Implements the <tt>clear</tt> method as per the specification in
+     * Implements the {@code clear} method as per the specification in
      * {@link Preferences#clear()}.
      *
      * <p>This implementation obtains this preference node's lock,
@@ -361,18 +361,18 @@
     }
 
     /**
-     * Implements the <tt>putInt</tt> method as per the specification in
+     * Implements the {@code putInt} method as per the specification in
      * {@link Preferences#putInt(String,int)}.
      *
-     * <p>This implementation translates <tt>value</tt> to a string with
+     * <p>This implementation translates {@code value} to a string with
      * {@link Integer#toString(int)} and invokes {@link #put(String,String)}
      * on the result.
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if key is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if key is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalArgumentException if key contains
      *         the null control character, code point U+0000.
      * @throws IllegalStateException if this node (or an ancestor) has been
@@ -383,26 +383,26 @@
     }
 
     /**
-     * Implements the <tt>getInt</tt> method as per the specification in
+     * Implements the {@code getInt} method as per the specification in
      * {@link Preferences#getInt(String,int)}.
      *
-     * <p>This implementation invokes {@link #get(String,String) <tt>get(key,
-     * null)</tt>}.  If the return value is non-null, the implementation
-     * attempts to translate it to an <tt>int</tt> with
+     * <p>This implementation invokes {@link #get(String,String) get(key,
+     * null)}.  If the return value is non-null, the implementation
+     * attempts to translate it to an {@code int} with
      * {@link Integer#parseInt(String)}.  If the attempt succeeds, the return
-     * value is returned by this method.  Otherwise, <tt>def</tt> is returned.
+     * value is returned by this method.  Otherwise, {@code def} is returned.
      *
      * @param key key whose associated value is to be returned as an int.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as an int.
      * @return the int value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         an int.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      */
@@ -420,18 +420,18 @@
     }
 
     /**
-     * Implements the <tt>putLong</tt> method as per the specification in
+     * Implements the {@code putLong} method as per the specification in
      * {@link Preferences#putLong(String,long)}.
      *
-     * <p>This implementation translates <tt>value</tt> to a string with
+     * <p>This implementation translates {@code value} to a string with
      * {@link Long#toString(long)} and invokes {@link #put(String,String)}
      * on the result.
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if key is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if key is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalArgumentException if key contains
      *         the null control character, code point U+0000.
      * @throws IllegalStateException if this node (or an ancestor) has been
@@ -442,26 +442,26 @@
     }
 
     /**
-     * Implements the <tt>getLong</tt> method as per the specification in
+     * Implements the {@code getLong} method as per the specification in
      * {@link Preferences#getLong(String,long)}.
      *
-     * <p>This implementation invokes {@link #get(String,String) <tt>get(key,
-     * null)</tt>}.  If the return value is non-null, the implementation
-     * attempts to translate it to a <tt>long</tt> with
+     * <p>This implementation invokes {@link #get(String,String) get(key,
+     * null)}.  If the return value is non-null, the implementation
+     * attempts to translate it to a {@code long} with
      * {@link Long#parseLong(String)}.  If the attempt succeeds, the return
-     * value is returned by this method.  Otherwise, <tt>def</tt> is returned.
+     * value is returned by this method.  Otherwise, {@code def} is returned.
      *
      * @param key key whose associated value is to be returned as a long.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a long.
      * @return the long value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a long.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      */
@@ -479,18 +479,18 @@
     }
 
     /**
-     * Implements the <tt>putBoolean</tt> method as per the specification in
+     * Implements the {@code putBoolean} method as per the specification in
      * {@link Preferences#putBoolean(String,boolean)}.
      *
-     * <p>This implementation translates <tt>value</tt> to a string with
+     * <p>This implementation translates {@code value} to a string with
      * {@link String#valueOf(boolean)} and invokes {@link #put(String,String)}
      * on the result.
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if key is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if key is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalArgumentException if key contains
      *         the null control character, code point U+0000.
      * @throws IllegalStateException if this node (or an ancestor) has been
@@ -501,29 +501,29 @@
     }
 
     /**
-     * Implements the <tt>getBoolean</tt> method as per the specification in
+     * Implements the {@code getBoolean} method as per the specification in
      * {@link Preferences#getBoolean(String,boolean)}.
      *
-     * <p>This implementation invokes {@link #get(String,String) <tt>get(key,
-     * null)</tt>}.  If the return value is non-null, it is compared with
-     * <tt>"true"</tt> using {@link String#equalsIgnoreCase(String)}.  If the
-     * comparison returns <tt>true</tt>, this invocation returns
-     * <tt>true</tt>.  Otherwise, the original return value is compared with
-     * <tt>"false"</tt>, again using {@link String#equalsIgnoreCase(String)}.
-     * If the comparison returns <tt>true</tt>, this invocation returns
-     * <tt>false</tt>.  Otherwise, this invocation returns <tt>def</tt>.
+     * <p>This implementation invokes {@link #get(String,String) get(key,
+     * null)}.  If the return value is non-null, it is compared with
+     * {@code "true"} using {@link String#equalsIgnoreCase(String)}.  If the
+     * comparison returns {@code true}, this invocation returns
+     * {@code true}.  Otherwise, the original return value is compared with
+     * {@code "false"}, again using {@link String#equalsIgnoreCase(String)}.
+     * If the comparison returns {@code true}, this invocation returns
+     * {@code false}.  Otherwise, this invocation returns {@code def}.
      *
      * @param key key whose associated value is to be returned as a boolean.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a boolean.
      * @return the boolean value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a boolean.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      */
@@ -541,18 +541,18 @@
     }
 
     /**
-     * Implements the <tt>putFloat</tt> method as per the specification in
+     * Implements the {@code putFloat} method as per the specification in
      * {@link Preferences#putFloat(String,float)}.
      *
-     * <p>This implementation translates <tt>value</tt> to a string with
+     * <p>This implementation translates {@code value} to a string with
      * {@link Float#toString(float)} and invokes {@link #put(String,String)}
      * on the result.
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if key is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if key is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalArgumentException if key contains
      *         the null control character, code point U+0000.
      * @throws IllegalStateException if this node (or an ancestor) has been
@@ -563,26 +563,26 @@
     }
 
     /**
-     * Implements the <tt>getFloat</tt> method as per the specification in
+     * Implements the {@code getFloat} method as per the specification in
      * {@link Preferences#getFloat(String,float)}.
      *
-     * <p>This implementation invokes {@link #get(String,String) <tt>get(key,
-     * null)</tt>}.  If the return value is non-null, the implementation
-     * attempts to translate it to an <tt>float</tt> with
+     * <p>This implementation invokes {@link #get(String,String) get(key,
+     * null)}.  If the return value is non-null, the implementation
+     * attempts to translate it to an {@code float} with
      * {@link Float#parseFloat(String)}.  If the attempt succeeds, the return
-     * value is returned by this method.  Otherwise, <tt>def</tt> is returned.
+     * value is returned by this method.  Otherwise, {@code def} is returned.
      *
      * @param key key whose associated value is to be returned as a float.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a float.
      * @return the float value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a float.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      */
@@ -600,18 +600,18 @@
     }
 
     /**
-     * Implements the <tt>putDouble</tt> method as per the specification in
+     * Implements the {@code putDouble} method as per the specification in
      * {@link Preferences#putDouble(String,double)}.
      *
-     * <p>This implementation translates <tt>value</tt> to a string with
+     * <p>This implementation translates {@code value} to a string with
      * {@link Double#toString(double)} and invokes {@link #put(String,String)}
      * on the result.
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if key is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if key is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalArgumentException if key contains
      *         the null control character, code point U+0000.
      * @throws IllegalStateException if this node (or an ancestor) has been
@@ -622,26 +622,26 @@
     }
 
     /**
-     * Implements the <tt>getDouble</tt> method as per the specification in
+     * Implements the {@code getDouble} method as per the specification in
      * {@link Preferences#getDouble(String,double)}.
      *
-     * <p>This implementation invokes {@link #get(String,String) <tt>get(key,
-     * null)</tt>}.  If the return value is non-null, the implementation
-     * attempts to translate it to an <tt>double</tt> with
+     * <p>This implementation invokes {@link #get(String,String) get(key,
+     * null)}.  If the return value is non-null, the implementation
+     * attempts to translate it to an {@code double} with
      * {@link Double#parseDouble(String)}.  If the attempt succeeds, the return
-     * value is returned by this method.  Otherwise, <tt>def</tt> is returned.
+     * value is returned by this method.  Otherwise, {@code def} is returned.
      *
      * @param key key whose associated value is to be returned as a double.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a double.
      * @return the double value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a double.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      */
@@ -659,12 +659,12 @@
     }
 
     /**
-     * Implements the <tt>putByteArray</tt> method as per the specification in
+     * Implements the {@code putByteArray} method as per the specification in
      * {@link Preferences#putByteArray(String,byte[])}.
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if key or value is <tt>null</tt>.
+     * @throws NullPointerException if key or value is {@code null}.
      * @throws IllegalArgumentException if key.length() exceeds MAX_KEY_LENGTH
      *         or if value.length exceeds MAX_VALUE_LENGTH*3/4.
      * @throws IllegalArgumentException if key contains
@@ -677,21 +677,21 @@
     }
 
     /**
-     * Implements the <tt>getByteArray</tt> method as per the specification in
+     * Implements the {@code getByteArray} method as per the specification in
      * {@link Preferences#getByteArray(String,byte[])}.
      *
      * @param key key whose associated value is to be returned as a byte array.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a byte array.
      * @return the byte array value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a byte array.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.  (A
-     *         <tt>null</tt> value for <tt>def</tt> <i>is</i> permitted.)
+     * @throws NullPointerException if {@code key} is {@code null}.  (A
+     *         {@code null} value for {@code def} <i>is</i> permitted.)
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      */
@@ -710,7 +710,7 @@
     }
 
     /**
-     * Implements the <tt>keys</tt> method as per the specification in
+     * Implements the {@code keys} method as per the specification in
      * {@link Preferences#keys()}.
      *
      * <p>This implementation obtains this preference node's lock, checks that
@@ -734,15 +734,15 @@
     }
 
     /**
-     * Implements the <tt>children</tt> method as per the specification in
+     * Implements the {@code children} method as per the specification in
      * {@link Preferences#childrenNames()}.
      *
      * <p>This implementation obtains this preference node's lock, checks that
-     * the node has not been removed, constructs a <tt>TreeSet</tt> initialized
+     * the node has not been removed, constructs a {@code TreeSet} initialized
      * to the names of children already cached (the children in this node's
      * "child-cache"), invokes {@link #childrenNamesSpi()}, and adds all of the
      * returned child-names into the set.  The elements of the tree set are
-     * dumped into a <tt>String</tt> array using the <tt>toArray</tt> method,
+     * dumped into a {@code String} array using the {@code toArray} method,
      * and this array is returned.
      *
      * @return the names of the children of this preference node.
@@ -780,7 +780,7 @@
         = new AbstractPreferences[0];
 
     /**
-     * Implements the <tt>parent</tt> method as per the specification in
+     * Implements the {@code parent} method as per the specification in
      * {@link Preferences#parent()}.
      *
      * <p>This implementation obtains this preference node's lock, checks that
@@ -801,35 +801,35 @@
     }
 
     /**
-     * Implements the <tt>node</tt> method as per the specification in
+     * Implements the {@code node} method as per the specification in
      * {@link Preferences#node(String)}.
      *
      * <p>This implementation obtains this preference node's lock and checks
-     * that the node has not been removed.  If <tt>path</tt> is <tt>""</tt>,
-     * this node is returned; if <tt>path</tt> is <tt>"/"</tt>, this node's
-     * root is returned.  If the first character in <tt>path</tt> is
-     * not <tt>'/'</tt>, the implementation breaks <tt>path</tt> into
+     * that the node has not been removed.  If {@code path} is {@code ""},
+     * this node is returned; if {@code path} is {@code "/"}, this node's
+     * root is returned.  If the first character in {@code path} is
+     * not {@code '/'}, the implementation breaks {@code path} into
      * tokens and recursively traverses the path from this node to the
-     * named node, "consuming" a name and a slash from <tt>path</tt> at
+     * named node, "consuming" a name and a slash from {@code path} at
      * each step of the traversal.  At each step, the current node is locked
      * and the node's child-cache is checked for the named node.  If it is
      * not found, the name is checked to make sure its length does not
-     * exceed <tt>MAX_NAME_LENGTH</tt>.  Then the {@link #childSpi(String)}
+     * exceed {@code MAX_NAME_LENGTH}.  Then the {@link #childSpi(String)}
      * method is invoked, and the result stored in this node's child-cache.
-     * If the newly created <tt>Preferences</tt> object's {@link #newNode}
-     * field is <tt>true</tt> and there are any node change listeners,
+     * If the newly created {@code Preferences} object's {@link #newNode}
+     * field is {@code true} and there are any node change listeners,
      * a notification event is enqueued for processing by the event dispatch
      * thread.
      *
      * <p>When there are no more tokens, the last value found in the
-     * child-cache or returned by <tt>childSpi</tt> is returned by this
-     * method.  If during the traversal, two <tt>"/"</tt> tokens occur
-     * consecutively, or the final token is <tt>"/"</tt> (rather than a name),
-     * an appropriate <tt>IllegalArgumentException</tt> is thrown.
+     * child-cache or returned by {@code childSpi} is returned by this
+     * method.  If during the traversal, two {@code "/"} tokens occur
+     * consecutively, or the final token is {@code "/"} (rather than a name),
+     * an appropriate {@code IllegalArgumentException} is thrown.
      *
-     * <p> If the first character of <tt>path</tt> is <tt>'/'</tt>
+     * <p> If the first character of {@code path} is {@code '/'}
      * (indicating an absolute path name) this preference node's
-     * lock is dropped prior to breaking <tt>path</tt> into tokens, and
+     * lock is dropped prior to breaking {@code path} into tokens, and
      * this method recursively traverses the path starting from the root
      * (rather than starting from this node).  The traversal is otherwise
      * identical to the one described for relative path names.  Dropping
@@ -889,7 +889,7 @@
     }
 
     /**
-     * Implements the <tt>nodeExists</tt> method as per the specification in
+     * Implements the {@code nodeExists} method as per the specification in
      * {@link Preferences#nodeExists(String)}.
      *
      * <p>This implementation is very similar to {@link #node(String)},
@@ -906,7 +906,7 @@
      *         with a slash character and is more than one character long).
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method and
-     *         <tt>pathname</tt> is not the empty string (<tt>""</tt>).
+     *         {@code pathname} is not the empty string ({@code ""}).
      */
     public boolean nodeExists(String path)
         throws BackingStoreException
@@ -953,7 +953,7 @@
 
     /**
 
-     * Implements the <tt>removeNode()</tt> method as per the specification in
+     * Implements the {@code removeNode()} method as per the specification in
      * {@link Preferences#removeNode()}.
      *
      * <p>This implementation checks to see that this node is the root; if so,
@@ -964,7 +964,7 @@
      * of its children are cached: The {@link #childrenNamesSpi()} method is
      * invoked and each returned child name is checked for containment in the
      * child-cache.  If a child is not already cached, the {@link
-     * #childSpi(String)} method is invoked to create a <tt>Preferences</tt>
+     * #childSpi(String)} method is invoked to create a {@code Preferences}
      * instance for it, and this instance is put into the child-cache.  Then
      * the helper method calls itself recursively on each node contained in its
      * child-cache.  Next, it invokes {@link #removeNodeSpi()}, marks itself
@@ -1024,7 +1024,7 @@
     }
 
     /**
-     * Implements the <tt>name</tt> method as per the specification in
+     * Implements the {@code name} method as per the specification in
      * {@link Preferences#name()}.
      *
      * <p>This implementation merely returns the name that was
@@ -1037,7 +1037,7 @@
     }
 
     /**
-     * Implements the <tt>absolutePath</tt> method as per the specification in
+     * Implements the {@code absolutePath} method as per the specification in
      * {@link Preferences#absolutePath()}.
      *
      * <p>This implementation merely returns the absolute path name that
@@ -1052,7 +1052,7 @@
     }
 
     /**
-     * Implements the <tt>isUserNode</tt> method as per the specification in
+     * Implements the {@code isUserNode} method as per the specification in
      * {@link Preferences#isUserNode()}.
      *
      * <p>This implementation compares this node's root node (which is stored
@@ -1060,8 +1060,8 @@
      * {@link Preferences#userRoot()}.  If the two object references are
      * identical, this method returns true.
      *
-     * @return <tt>true</tt> if this preference node is in the user
-     *         preference tree, <tt>false</tt> if it's in the system
+     * @return {@code true} if this preference node is in the user
+     *         preference tree, {@code false} if it's in the system
      *         preference tree.
      */
     public boolean isUserNode() {
@@ -1160,7 +1160,7 @@
 
     /**
      * Put the given key-value association into this preference node.  It is
-     * guaranteed that <tt>key</tt> and <tt>value</tt> are non-null and of
+     * guaranteed that {@code key} and {@code value} are non-null and of
      * legal length.  Also, it is guaranteed that this node has not been
      * removed.  (The implementor needn't check for any of these things.)
      *
@@ -1172,29 +1172,29 @@
 
     /**
      * Return the value associated with the specified key at this preference
-     * node, or <tt>null</tt> if there is no association for this key, or the
+     * node, or {@code null} if there is no association for this key, or the
      * association cannot be determined at this time.  It is guaranteed that
-     * <tt>key</tt> is non-null.  Also, it is guaranteed that this node has
+     * {@code key} is non-null.  Also, it is guaranteed that this node has
      * not been removed.  (The implementor needn't check for either of these
      * things.)
      *
      * <p> Generally speaking, this method should not throw an exception
      * under any circumstances.  If, however, if it does throw an exception,
-     * the exception will be intercepted and treated as a <tt>null</tt>
+     * the exception will be intercepted and treated as a {@code null}
      * return value.
      *
      * <p>This method is invoked with the lock on this node held.
      *
      * @param key the key
      * @return the value associated with the specified key at this preference
-     *          node, or <tt>null</tt> if there is no association for this
+     *          node, or {@code null} if there is no association for this
      *          key, or the association cannot be determined at this time.
      */
     protected abstract String getSpi(String key);
 
     /**
      * Remove the association (if any) for the specified key at this
-     * preference node.  It is guaranteed that <tt>key</tt> is non-null.
+     * preference node.  It is guaranteed that {@code key} is non-null.
      * Also, it is guaranteed that this node has not been removed.
      * (The implementor needn't check for either of these things.)
      *
@@ -1215,9 +1215,9 @@
      * result of a single invocation to {@link Preferences#removeNode()}).
      *
      * <p>The removal of a node needn't become persistent until the
-     * <tt>flush</tt> method is invoked on this node (or an ancestor).
+     * {@code flush} method is invoked on this node (or an ancestor).
      *
-     * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
+     * <p>If this node throws a {@code BackingStoreException}, the exception
      * will propagate out beyond the enclosing {@link #removeNode()}
      * invocation.
      *
@@ -1235,7 +1235,7 @@
      *
      * <p>This method is invoked with the lock on this node held.
      *
-     * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
+     * <p>If this node throws a {@code BackingStoreException}, the exception
      * will propagate out beyond the enclosing {@link #keys()} invocation.
      *
      * @return an array of the keys that have an associated value in this
@@ -1254,7 +1254,7 @@
      *
      * <p>This method is invoked with the lock on this node held.
      *
-     * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
+     * <p>If this node throws a {@code BackingStoreException}, the exception
      * will propagate out beyond the enclosing {@link #childrenNames()}
      * invocation.
      *
@@ -1268,8 +1268,8 @@
         throws BackingStoreException;
 
     /**
-     * Returns the named child if it exists, or <tt>null</tt> if it does not.
-     * It is guaranteed that <tt>nodeName</tt> is non-null, non-empty,
+     * Returns the named child if it exists, or {@code null} if it does not.
+     * It is guaranteed that {@code nodeName} is non-null, non-empty,
      * does not contain the slash character ('/'), and is no longer than
      * {@link #MAX_NAME_LENGTH} characters.  Also, it is guaranteed
      * that this node has not been removed.  (The implementor needn't check
@@ -1288,7 +1288,7 @@
      * with the specified node name.  If a child node has the correct name,
      * the {@link #childSpi(String)} method is invoked and the resulting
      * node is returned.  If the iteration completes without finding the
-     * specified name, <tt>null</tt> is returned.
+     * specified name, {@code null} is returned.
      *
      * @param nodeName name of the child to be searched for.
      * @return the named child if it exists, or null if it does not.
@@ -1310,7 +1310,7 @@
 
     /**
      * Returns the named child of this preference node, creating it if it does
-     * not already exist.  It is guaranteed that <tt>name</tt> is non-null,
+     * not already exist.  It is guaranteed that {@code name} is non-null,
      * non-empty, does not contain the slash character ('/'), and is no longer
      * than {@link #MAX_NAME_LENGTH} characters.  Also, it is guaranteed that
      * this node has not been removed.  (The implementor needn't check for any
@@ -1325,12 +1325,12 @@
      *
      * <p>The implementer must ensure that the returned node has not been
      * removed.  If a like-named child of this node was previously removed, the
-     * implementer must return a newly constructed <tt>AbstractPreferences</tt>
-     * node; once removed, an <tt>AbstractPreferences</tt> node
+     * implementer must return a newly constructed {@code AbstractPreferences}
+     * node; once removed, an {@code AbstractPreferences} node
      * cannot be "resuscitated."
      *
      * <p>If this method causes a node to be created, this node is not
-     * guaranteed to be persistent until the <tt>flush</tt> method is
+     * guaranteed to be persistent until the {@code flush} method is
      * invoked on this node or one of its ancestors (or descendants).
      *
      * <p>This method is invoked with the lock on this node held.
@@ -1350,7 +1350,7 @@
     }
 
     /**
-     * Implements the <tt>sync</tt> method as per the specification in
+     * Implements the {@code sync} method as per the specification in
      * {@link Preferences#sync()}.
      *
      * <p>This implementation calls a recursive helper method that locks this
@@ -1398,7 +1398,7 @@
      * entire subtree at once, the implementer is encouraged to override
      * sync(), rather than merely overriding this method.
      *
-     * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
+     * <p>If this node throws a {@code BackingStoreException}, the exception
      * will propagate out beyond the enclosing {@link #sync()} invocation.
      *
      * @throws BackingStoreException if this operation cannot be completed
@@ -1408,7 +1408,7 @@
     protected abstract void syncSpi() throws BackingStoreException;
 
     /**
-     * Implements the <tt>flush</tt> method as per the specification in
+     * Implements the {@code flush} method as per the specification in
      * {@link Preferences#flush()}.
      *
      * <p>This implementation calls a recursive helper method that locks this
@@ -1459,7 +1459,7 @@
      * encouraged to override flush(), rather than merely overriding this
      * method.
      *
-     * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
+     * <p>If this node throws a {@code BackingStoreException}, the exception
      * will propagate out beyond the enclosing {@link #flush()} invocation.
      *
      * @throws BackingStoreException if this operation cannot be completed
@@ -1469,12 +1469,12 @@
     protected abstract void flushSpi() throws BackingStoreException;
 
     /**
-     * Returns <tt>true</tt> iff this node (or an ancestor) has been
+     * Returns {@code true} iff this node (or an ancestor) has been
      * removed with the {@link #removeNode()} method.  This method
      * locks this node prior to returning the contents of the private
      * field used to track this state.
      *
-     * @return <tt>true</tt> iff this node (or an ancestor) has been
+     * @return {@code true} iff this node (or an ancestor) has been
      *       removed with the {@link #removeNode()} method.
      */
     protected boolean isRemoved() {
@@ -1630,12 +1630,12 @@
     }
 
     /**
-     * Implements the <tt>exportNode</tt> method as per the specification in
+     * Implements the {@code exportNode} method as per the specification in
      * {@link Preferences#exportNode(OutputStream)}.
      *
      * @param os the output stream on which to emit the XML document.
      * @throws IOException if writing to the specified output stream
-     *         results in an <tt>IOException</tt>.
+     *         results in an {@code IOException}.
      * @throws BackingStoreException if preference data cannot be read from
      *         backing store.
      */
@@ -1646,12 +1646,12 @@
     }
 
     /**
-     * Implements the <tt>exportSubtree</tt> method as per the specification in
+     * Implements the {@code exportSubtree} method as per the specification in
      * {@link Preferences#exportSubtree(OutputStream)}.
      *
      * @param os the output stream on which to emit the XML document.
      * @throws IOException if writing to the specified output stream
-     *         results in an <tt>IOException</tt>.
+     *         results in an {@code IOException}.
      * @throws BackingStoreException if preference data cannot be read from
      *         backing store.
      */
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/Base64.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/Base64.java	Mon Aug 10 14:05:37 2015 +0300
@@ -124,7 +124,7 @@
      * Translates the specified Base64 string (as per Preferences.get(byte[]))
      * into a byte array.
      *
-     * @throw IllegalArgumentException if <tt>s</tt> is not a valid Base64
+     * @throw IllegalArgumentException if {@code s} is not a valid Base64
      *        string.
      */
     static byte[] base64ToByteArray(String s) {
@@ -136,7 +136,7 @@
      * into a byte array.
      *
      * @throw IllegalArgumentException or ArrayOutOfBoundsException
-     *        if <tt>s</tt> is not a valid alternate representation
+     *        if {@code s} is not a valid alternate representation
      *        Base64 string.
      */
     static byte[] altBase64ToByteArray(String s) {
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/NodeChangeEvent.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/NodeChangeEvent.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,7 +28,7 @@
 import java.io.NotSerializableException;
 
 /**
- * An event emitted by a <tt>Preferences</tt> node to indicate that
+ * An event emitted by a {@code Preferences} node to indicate that
  * a child of that node has been added or removed.<p>
  *
  * Note, that although NodeChangeEvent inherits Serializable interface from
@@ -52,7 +52,7 @@
     private Preferences child;
 
     /**
-     * Constructs a new <code>NodeChangeEvent</code> instance.
+     * Constructs a new {@code NodeChangeEvent} instance.
      *
      * @param parent  The parent of the node that was added or removed.
      * @param child   The node that was added or removed.
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/PreferenceChangeEvent.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/PreferenceChangeEvent.java	Mon Aug 10 14:05:37 2015 +0300
@@ -28,7 +28,7 @@
 import java.io.NotSerializableException;
 
 /**
- * An event emitted by a <tt>Preferences</tt> node to indicate that
+ * An event emitted by a {@code Preferences} node to indicate that
  * a preference has been added, removed or has had its value changed.<p>
  *
  * Note, that although PreferenceChangeEvent inherits Serializable interface
@@ -52,18 +52,18 @@
     private String key;
 
     /**
-     * New value for preference, or <tt>null</tt> if it was removed.
+     * New value for preference, or {@code null} if it was removed.
      *
      * @serial
      */
     private String newValue;
 
     /**
-     * Constructs a new <code>PreferenceChangeEvent</code> instance.
+     * Constructs a new {@code PreferenceChangeEvent} instance.
      *
      * @param node  The Preferences node that emitted the event.
      * @param key  The key of the preference that was changed.
-     * @param newValue  The new value of the preference, or <tt>null</tt>
+     * @param newValue  The new value of the preference, or {@code null}
      *                  if the preference is being removed.
      */
     public PreferenceChangeEvent(Preferences node, String key,
@@ -94,7 +94,7 @@
     /**
      * Returns the new value for the preference.
      *
-     * @return  The new value for the preference, or <tt>null</tt> if the
+     * @return  The new value for the preference, or {@code null} if the
      *          preference was removed.
      */
     public String getNewValue() {
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java	Mon Aug 10 14:05:37 2015 +0300
@@ -72,10 +72,10 @@
  * only restrictions on this name are that it cannot be the empty string, and
  * it cannot contain the slash character ('/').
  *
- * <p>The root node has an absolute path name of <tt>"/"</tt>.  Children of
- * the root node have absolute path names of <tt>"/" + </tt><i>&lt;node
+ * <p>The root node has an absolute path name of {@code "/"}.  Children of
+ * the root node have absolute path names of {@code "/" + }<i>&lt;node
  * name&gt;</i>.  All other nodes have absolute path names of <i>&lt;parent's
- * absolute path name&gt;</i><tt> + "/" + </tt><i>&lt;node name&gt;</i>.
+ * absolute path name&gt;</i>{@code  + "/" + }<i>&lt;node name&gt;</i>.
  * Note that all absolute path names begin with the slash character.
  *
  * <p>A node <i>n</i>'s path name relative to its ancestor <i>a</i>
@@ -102,18 +102,18 @@
  * <p>All of the methods that modify preferences data are permitted to operate
  * asynchronously; they may return immediately, and changes will eventually
  * propagate to the persistent backing store with an implementation-dependent
- * delay.  The <tt>flush</tt> method may be used to synchronously force
+ * delay.  The {@code flush} method may be used to synchronously force
  * updates to the backing store.  Normal termination of the Java Virtual
  * Machine will <i>not</i> result in the loss of pending updates -- an explicit
- * <tt>flush</tt> invocation is <i>not</i> required upon termination to ensure
+ * {@code flush} invocation is <i>not</i> required upon termination to ensure
  * that pending updates are made persistent.
  *
- * <p>All of the methods that read preferences from a <tt>Preferences</tt>
+ * <p>All of the methods that read preferences from a {@code Preferences}
  * object require the invoker to provide a default value.  The default value is
  * returned if no value has been previously set <i>or if the backing store is
  * unavailable</i>.  The intent is to allow applications to operate, albeit
  * with slightly degraded functionality, even if the backing store becomes
- * unavailable.  Several methods, like <tt>flush</tt>, have semantics that
+ * unavailable.  Several methods, like {@code flush}, have semantics that
  * prevent them from operating if the backing store is unavailable.  Ordinary
  * applications should have no need to invoke any of these methods, which can
  * be identified by the fact that they are declared to throw {@link
@@ -181,31 +181,31 @@
  *              value CDATA #REQUIRED >
  * }</pre>
  *
- * Every <tt>Preferences</tt> implementation must have an associated {@link
+ * Every {@code Preferences} implementation must have an associated {@link
  * PreferencesFactory} implementation.  Every Java(TM) SE implementation must provide
- * some means of specifying which <tt>PreferencesFactory</tt> implementation
+ * some means of specifying which {@code PreferencesFactory} implementation
  * is used to generate the root preferences nodes.  This allows the
  * administrator to replace the default preferences implementation with an
  * alternative implementation.
  *
- * <p>Implementation note: In Sun's JRE, the <tt>PreferencesFactory</tt>
+ * <p>Implementation note: In Sun's JRE, the {@code PreferencesFactory}
  * implementation is located as follows:
  *
  * <ol>
  *
  * <li><p>If the system property
- * <tt>java.util.prefs.PreferencesFactory</tt> is defined, then it is
+ * {@code java.util.prefs.PreferencesFactory} is defined, then it is
  * taken to be the fully-qualified name of a class implementing the
- * <tt>PreferencesFactory</tt> interface.  The class is loaded and
+ * {@code PreferencesFactory} interface.  The class is loaded and
  * instantiated; if this process fails then an unspecified error is
  * thrown.</p></li>
  *
- * <li><p> If a <tt>PreferencesFactory</tt> implementation class file
+ * <li><p> If a {@code PreferencesFactory} implementation class file
  * has been installed in a jar file that is visible to the
  * {@link java.lang.ClassLoader#getSystemClassLoader system class loader},
  * and that jar file contains a provider-configuration file named
- * <tt>java.util.prefs.PreferencesFactory</tt> in the resource
- * directory <tt>META-INF/services</tt>, then the first class name
+ * {@code java.util.prefs.PreferencesFactory} in the resource
+ * directory {@code META-INF/services}, then the first class name
  * specified in that file is taken.  If more than one such jar file is
  * provided, the first one found will be used.  The class is loaded
  * and instantiated; if this process fails then an unspecified error
@@ -213,7 +213,7 @@
  *
  * <li><p>Finally, if neither the above-mentioned system property nor
  * an extension jar file is provided, then the system-wide default
- * <tt>PreferencesFactory</tt> implementation for the underlying
+ * {@code PreferencesFactory} implementation for the underlying
  * platform is loaded and instantiated.</p></li>
  *
  * </ol>
@@ -328,19 +328,19 @@
      * Returns the preference node from the calling user's preference tree
      * that is associated (by convention) with the specified class's package.
      * The convention is as follows: the absolute path name of the node is the
-     * fully qualified package name, preceded by a slash (<tt>'/'</tt>), and
-     * with each period (<tt>'.'</tt>) replaced by a slash.  For example the
+     * fully qualified package name, preceded by a slash ({@code '/'}), and
+     * with each period ({@code '.'}) replaced by a slash.  For example the
      * absolute path name of the node associated with the class
-     * <tt>com.acme.widget.Foo</tt> is <tt>/com/acme/widget</tt>.
+     * {@code com.acme.widget.Foo} is {@code /com/acme/widget}.
      *
      * <p>This convention does not apply to the unnamed package, whose
-     * associated preference node is <tt>&lt;unnamed&gt;</tt>.  This node
+     * associated preference node is {@code <unnamed>}.  This node
      * is not intended for long term use, but for convenience in the early
      * development of programs that do not yet belong to a package, and
      * for "throwaway" programs.  <i>Valuable data should not be stored
      * at this node as it is shared by all programs that use it.</i>
      *
-     * <p>A class <tt>Foo</tt> wishing to access preferences pertaining to its
+     * <p>A class {@code Foo} wishing to access preferences pertaining to its
      * package can obtain a preference node as follows: <pre>
      *    static Preferences prefs = Preferences.userNodeForPackage(Foo.class);
      * </pre>
@@ -353,15 +353,15 @@
      * node and its ancestors if they do not already exist.  If the returned
      * node did not exist prior to this call, this node and any ancestors that
      * were created by this call are not guaranteed to become permanent until
-     * the <tt>flush</tt> method is called on the returned node (or one of its
+     * the {@code flush} method is called on the returned node (or one of its
      * ancestors or descendants).
      *
      * @param c the class for whose package a user preference node is desired.
      * @return the user preference node associated with the package of which
-     *         <tt>c</tt> is a member.
-     * @throws NullPointerException if <tt>c</tt> is <tt>null</tt>.
+     *         {@code c} is a member.
+     * @throws NullPointerException if {@code c} is {@code null}.
      * @throws SecurityException if a security manager is present and
-     *         it denies <tt>RuntimePermission("preferences")</tt>.
+     *         it denies {@code RuntimePermission("preferences")}.
      * @see    RuntimePermission
      */
     public static Preferences userNodeForPackage(Class<?> c) {
@@ -372,19 +372,19 @@
      * Returns the preference node from the system preference tree that is
      * associated (by convention) with the specified class's package.  The
      * convention is as follows: the absolute path name of the node is the
-     * fully qualified package name, preceded by a slash (<tt>'/'</tt>), and
-     * with each period (<tt>'.'</tt>) replaced by a slash.  For example the
+     * fully qualified package name, preceded by a slash ({@code '/'}), and
+     * with each period ({@code '.'}) replaced by a slash.  For example the
      * absolute path name of the node associated with the class
-     * <tt>com.acme.widget.Foo</tt> is <tt>/com/acme/widget</tt>.
+     * {@code com.acme.widget.Foo} is {@code /com/acme/widget}.
      *
      * <p>This convention does not apply to the unnamed package, whose
-     * associated preference node is <tt>&lt;unnamed&gt;</tt>.  This node
+     * associated preference node is {@code <unnamed>}.  This node
      * is not intended for long term use, but for convenience in the early
      * development of programs that do not yet belong to a package, and
      * for "throwaway" programs.  <i>Valuable data should not be stored
      * at this node as it is shared by all programs that use it.</i>
      *
-     * <p>A class <tt>Foo</tt> wishing to access preferences pertaining to its
+     * <p>A class {@code Foo} wishing to access preferences pertaining to its
      * package can obtain a preference node as follows: <pre>
      *  static Preferences prefs = Preferences.systemNodeForPackage(Foo.class);
      * </pre>
@@ -397,15 +397,15 @@
      * node and its ancestors if they do not already exist.  If the returned
      * node did not exist prior to this call, this node and any ancestors that
      * were created by this call are not guaranteed to become permanent until
-     * the <tt>flush</tt> method is called on the returned node (or one of its
+     * the {@code flush} method is called on the returned node (or one of its
      * ancestors or descendants).
      *
      * @param c the class for whose package a system preference node is desired.
      * @return the system preference node associated with the package of which
-     *         <tt>c</tt> is a member.
-     * @throws NullPointerException if <tt>c</tt> is <tt>null</tt>.
+     *         {@code c} is a member.
+     * @throws NullPointerException if {@code c} is {@code null}.
      * @throws SecurityException if a security manager is present and
-     *         it denies <tt>RuntimePermission("preferences")</tt>.
+     *         it denies {@code RuntimePermission("preferences")}.
      * @see    RuntimePermission
      */
     public static Preferences systemNodeForPackage(Class<?> c) {
@@ -443,7 +443,7 @@
      *
      * @return the root preference node for the calling user.
      * @throws SecurityException If a security manager is present and
-     *         it denies <tt>RuntimePermission("preferences")</tt>.
+     *         it denies {@code RuntimePermission("preferences")}.
      * @see    RuntimePermission
      */
     public static Preferences userRoot() {
@@ -459,7 +459,7 @@
      *
      * @return the root preference node for the system.
      * @throws SecurityException If a security manager is present and
-     *         it denies <tt>RuntimePermission("preferences")</tt>.
+     *         it denies {@code RuntimePermission("preferences")}.
      * @see    RuntimePermission
      */
     public static Preferences systemRoot() {
@@ -483,10 +483,10 @@
      *
      * @param key key with which the specified value is to be associated.
      * @param value value to be associated with the specified key.
-     * @throws NullPointerException if key or value is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *       <tt>MAX_KEY_LENGTH</tt> or if <tt>value.length</tt> exceeds
-     *       <tt>MAX_VALUE_LENGTH</tt>.
+     * @throws NullPointerException if key or value is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *       {@code MAX_KEY_LENGTH} or if {@code value.length} exceeds
+     *       {@code MAX_VALUE_LENGTH}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @throws IllegalArgumentException if either key or value contain
@@ -506,14 +506,14 @@
      *
      * @param key key whose associated value is to be returned.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>.
-     * @return the value associated with <tt>key</tt>, or <tt>def</tt>
-     *         if no value is associated with <tt>key</tt>, or the backing
+     *        preference node has no value associated with {@code key}.
+     * @return the value associated with {@code key}, or {@code def}
+     *         if no value is associated with {@code key}, or the backing
      *         store is inaccessible.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.  (A
-     *         <tt>null</tt> value for <tt>def</tt> <i>is</i> permitted.)
+     * @throws NullPointerException if {@code key} is {@code null}.  (A
+     *         {@code null} value for {@code def} <i>is</i> permitted.)
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      */
@@ -526,10 +526,10 @@
      * <p>If this implementation supports <i>stored defaults</i>, and there is
      * such a default for the specified preference, the stored default will be
      * "exposed" by this call, in the sense that it will be returned
-     * by a succeeding call to <tt>get</tt>.
+     * by a succeeding call to {@code get}.
      *
      * @param key key whose mapping is to be removed from the preference node.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @throws IllegalArgumentException if key contains the null control
@@ -545,7 +545,7 @@
      * <p>If this implementation supports <i>stored defaults</i>, and this
      * node in the preferences hierarchy contains any such defaults,
      * the stored defaults will be "exposed" by this call, in the sense that
-     * they will be returned by succeeding calls to <tt>get</tt>.
+     * they will be returned by succeeding calls to {@code get}.
      *
      * @throws BackingStoreException if this operation cannot be completed
      *         due to a failure in the backing store, or inability to
@@ -565,9 +565,9 @@
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @throws IllegalArgumentException if key contains
@@ -582,27 +582,27 @@
      * an integer as by {@link Integer#parseInt(String)}.  Returns the
      * specified default if there is no value associated with the key,
      * the backing store is inaccessible, or if
-     * <tt>Integer.parseInt(String)</tt> would throw a {@link
+     * {@code Integer.parseInt(String)} would throw a {@link
      * NumberFormatException} if the associated value were passed.  This
      * method is intended for use in conjunction with {@link #putInt}.
      *
      * <p>If the implementation supports <i>stored defaults</i> and such a
      * default exists, is accessible, and could be converted to an int
-     * with <tt>Integer.parseInt</tt>, this int is returned in preference to
+     * with {@code Integer.parseInt}, this int is returned in preference to
      * the specified default.
      *
      * @param key key whose associated value is to be returned as an int.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as an int,
      *        or the backing store is inaccessible.
      * @return the int value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         an int.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      * @see #putInt(String,int)
@@ -619,9 +619,9 @@
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @throws IllegalArgumentException if key contains
@@ -636,27 +636,27 @@
      * a long as by {@link Long#parseLong(String)}.  Returns the
      * specified default if there is no value associated with the key,
      * the backing store is inaccessible, or if
-     * <tt>Long.parseLong(String)</tt> would throw a {@link
+     * {@code Long.parseLong(String)} would throw a {@link
      * NumberFormatException} if the associated value were passed.  This
      * method is intended for use in conjunction with {@link #putLong}.
      *
      * <p>If the implementation supports <i>stored defaults</i> and such a
      * default exists, is accessible, and could be converted to a long
-     * with <tt>Long.parseLong</tt>, this long is returned in preference to
+     * with {@code Long.parseLong}, this long is returned in preference to
      * the specified default.
      *
      * @param key key whose associated value is to be returned as a long.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a long,
      *        or the backing store is inaccessible.
      * @return the long value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a long.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      * @see #putLong(String,long)
@@ -667,15 +667,15 @@
     /**
      * Associates a string representing the specified boolean value with the
      * specified key in this preference node.  The associated string is
-     * <tt>"true"</tt> if the value is true, and <tt>"false"</tt> if it is
+     * {@code "true"} if the value is true, and {@code "false"} if it is
      * false.  This method is intended for use in conjunction with
      * {@link #getBoolean}.
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @throws IllegalArgumentException if key contains
@@ -688,34 +688,34 @@
     /**
      * Returns the boolean value represented by the string associated with the
      * specified key in this preference node.  Valid strings
-     * are <tt>"true"</tt>, which represents true, and <tt>"false"</tt>, which
-     * represents false.  Case is ignored, so, for example, <tt>"TRUE"</tt>
-     * and <tt>"False"</tt> are also valid.  This method is intended for use in
+     * are {@code "true"}, which represents true, and {@code "false"}, which
+     * represents false.  Case is ignored, so, for example, {@code "TRUE"}
+     * and {@code "False"} are also valid.  This method is intended for use in
      * conjunction with {@link #putBoolean}.
      *
      * <p>Returns the specified default if there is no value
      * associated with the key, the backing store is inaccessible, or if the
-     * associated value is something other than <tt>"true"</tt> or
-     * <tt>"false"</tt>, ignoring case.
+     * associated value is something other than {@code "true"} or
+     * {@code "false"}, ignoring case.
      *
      * <p>If the implementation supports <i>stored defaults</i> and such a
      * default exists and is accessible, it is used in preference to the
      * specified default, unless the stored default is something other than
-     * <tt>"true"</tt> or <tt>"false"</tt>, ignoring case, in which case the
+     * {@code "true"} or {@code "false"}, ignoring case, in which case the
      * specified default is used.
      *
      * @param key key whose associated value is to be returned as a boolean.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a boolean,
      *        or the backing store is inaccessible.
      * @return the boolean value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a boolean.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      * @see #get(String,String)
@@ -732,9 +732,9 @@
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @throws IllegalArgumentException if key contains
@@ -748,27 +748,27 @@
      * specified key in this preference node.  The string is converted to an
      * integer as by {@link Float#parseFloat(String)}.  Returns the specified
      * default if there is no value associated with the key, the backing store
-     * is inaccessible, or if <tt>Float.parseFloat(String)</tt> would throw a
+     * is inaccessible, or if {@code Float.parseFloat(String)} would throw a
      * {@link NumberFormatException} if the associated value were passed.
      * This method is intended for use in conjunction with {@link #putFloat}.
      *
      * <p>If the implementation supports <i>stored defaults</i> and such a
      * default exists, is accessible, and could be converted to a float
-     * with <tt>Float.parseFloat</tt>, this float is returned in preference to
+     * with {@code Float.parseFloat}, this float is returned in preference to
      * the specified default.
      *
      * @param key key whose associated value is to be returned as a float.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a float,
      *        or the backing store is inaccessible.
      * @return the float value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a float.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      * @see #putFloat(String,float)
@@ -785,9 +785,9 @@
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
-     * @throws IllegalArgumentException if <tt>key.length()</tt> exceeds
-     *         <tt>MAX_KEY_LENGTH</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
+     * @throws IllegalArgumentException if {@code key.length()} exceeds
+     *         {@code MAX_KEY_LENGTH}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @throws IllegalArgumentException if key contains
@@ -801,27 +801,27 @@
      * specified key in this preference node.  The string is converted to an
      * integer as by {@link Double#parseDouble(String)}.  Returns the specified
      * default if there is no value associated with the key, the backing store
-     * is inaccessible, or if <tt>Double.parseDouble(String)</tt> would throw a
+     * is inaccessible, or if {@code Double.parseDouble(String)} would throw a
      * {@link NumberFormatException} if the associated value were passed.
      * This method is intended for use in conjunction with {@link #putDouble}.
      *
      * <p>If the implementation supports <i>stored defaults</i> and such a
      * default exists, is accessible, and could be converted to a double
-     * with <tt>Double.parseDouble</tt>, this double is returned in preference
+     * with {@code Double.parseDouble}, this double is returned in preference
      * to the specified default.
      *
      * @param key key whose associated value is to be returned as a double.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a double,
      *        or the backing store is inaccessible.
      * @return the double value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a double.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
+     * @throws NullPointerException if {@code key} is {@code null}.
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      * @see #putDouble(String,double)
@@ -837,14 +837,14 @@
      * with one minor change: the string will consist solely of characters
      * from the <i>Base64 Alphabet</i>; it will not contain any newline
      * characters.  Note that the maximum length of the byte array is limited
-     * to three quarters of <tt>MAX_VALUE_LENGTH</tt> so that the length
-     * of the Base64 encoded String does not exceed <tt>MAX_VALUE_LENGTH</tt>.
+     * to three quarters of {@code MAX_VALUE_LENGTH} so that the length
+     * of the Base64 encoded String does not exceed {@code MAX_VALUE_LENGTH}.
      * This method is intended for use in conjunction with
      * {@link #getByteArray}.
      *
      * @param key key with which the string form of value is to be associated.
      * @param value value whose string form is to be associated with key.
-     * @throws NullPointerException if key or value is <tt>null</tt>.
+     * @throws NullPointerException if key or value is {@code null}.
      * @throws IllegalArgumentException if key.length() exceeds MAX_KEY_LENGTH
      *         or if value.length exceeds MAX_VALUE_LENGTH*3/4.
      * @throws IllegalStateException if this node (or an ancestor) has been
@@ -879,17 +879,17 @@
      *
      * @param key key whose associated value is to be returned as a byte array.
      * @param def the value to be returned in the event that this
-     *        preference node has no value associated with <tt>key</tt>
+     *        preference node has no value associated with {@code key}
      *        or the associated value cannot be interpreted as a byte array,
      *        or the backing store is inaccessible.
      * @return the byte array value represented by the string associated with
-     *         <tt>key</tt> in this preference node, or <tt>def</tt> if the
+     *         {@code key} in this preference node, or {@code def} if the
      *         associated value does not exist or cannot be interpreted as
      *         a byte array.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
-     * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.  (A
-     *         <tt>null</tt> value for <tt>def</tt> <i>is</i> permitted.)
+     * @throws NullPointerException if {@code key} is {@code null}.  (A
+     *         {@code null} value for {@code def} <i>is</i> permitted.)
      * @throws IllegalArgumentException if key contains the null control
      *         character, code point U+0000.
      * @see #get(String,String)
@@ -932,7 +932,7 @@
     public abstract String[] childrenNames() throws BackingStoreException;
 
     /**
-     * Returns the parent of this preference node, or <tt>null</tt> if this is
+     * Returns the parent of this preference node, or {@code null} if this is
      * the root.
      *
      * @return the parent of this preference node.
@@ -945,12 +945,12 @@
      * Returns the named preference node in the same tree as this node,
      * creating it and any of its ancestors if they do not already exist.
      * Accepts a relative or absolute path name.  Relative path names
-     * (which do not begin with the slash character <tt>('/')</tt>) are
+     * (which do not begin with the slash character {@code ('/')}) are
      * interpreted relative to this preference node.
      *
      * <p>If the returned node did not exist prior to this call, this node and
      * any ancestors that were created by this call are not guaranteed
-     * to become permanent until the <tt>flush</tt> method is called on
+     * to become permanent until the {@code flush} method is called on
      * the returned node (or one of its ancestors or descendants).
      *
      * @param pathName the path name of the preference node to return.
@@ -958,7 +958,7 @@
      * @throws IllegalArgumentException if the path name is invalid (i.e.,
      *         it contains multiple consecutive slash characters, or ends
      *         with a slash character and is more than one character long).
-     * @throws NullPointerException if path name is <tt>null</tt>.
+     * @throws NullPointerException if path name is {@code null}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @see #flush()
@@ -968,14 +968,14 @@
     /**
      * Returns true if the named preference node exists in the same tree
      * as this node.  Relative path names (which do not begin with the slash
-     * character <tt>('/')</tt>) are interpreted relative to this preference
+     * character {@code ('/')}) are interpreted relative to this preference
      * node.
      *
      * <p>If this node (or an ancestor) has already been removed with the
      * {@link #removeNode()} method, it <i>is</i> legal to invoke this method,
-     * but only with the path name <tt>""</tt>; the invocation will return
-     * <tt>false</tt>.  Thus, the idiom <tt>p.nodeExists("")</tt> may be
-     * used to test whether <tt>p</tt> has been removed.
+     * but only with the path name {@code ""}; the invocation will return
+     * {@code false}.  Thus, the idiom {@code p.nodeExists("")} may be
+     * used to test whether {@code p} has been removed.
      *
      * @param pathName the path name of the node whose existence
      *        is to be checked.
@@ -986,10 +986,10 @@
      * @throws IllegalArgumentException if the path name is invalid (i.e.,
      *         it contains multiple consecutive slash characters, or ends
      *         with a slash character and is more than one character long).
-     * @throws NullPointerException if path name is <tt>null</tt>.
+     * @throws NullPointerException if path name is {@code null}.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method and
-     *         <tt>pathName</tt> is not the empty string (<tt>""</tt>).
+     *         {@code pathName} is not the empty string ({@code ""}).
      */
     public abstract boolean nodeExists(String pathName)
         throws BackingStoreException;
@@ -1000,19 +1000,19 @@
      * removed, attempting any method other than {@link #name()},
      * {@link #absolutePath()}, {@link #isUserNode()}, {@link #flush()} or
      * {@link #node(String) nodeExists("")} on the corresponding
-     * <tt>Preferences</tt> instance will fail with an
-     * <tt>IllegalStateException</tt>.  (The methods defined on {@link Object}
+     * {@code Preferences} instance will fail with an
+     * {@code IllegalStateException}.  (The methods defined on {@link Object}
      * can still be invoked on a node after it has been removed; they will not
-     * throw <tt>IllegalStateException</tt>.)
+     * throw {@code IllegalStateException}.)
      *
      * <p>The removal is not guaranteed to be persistent until the
-     * <tt>flush</tt> method is called on this node (or an ancestor).
+     * {@code flush} method is called on this node (or an ancestor).
      *
      * <p>If this implementation supports <i>stored defaults</i>, removing a
      * node exposes any stored defaults at or below this node.  Thus, a
-     * subsequent call to <tt>nodeExists</tt> on this node's path name may
-     * return <tt>true</tt>, and a subsequent call to <tt>node</tt> on this
-     * path name may return a (different) <tt>Preferences</tt> instance
+     * subsequent call to {@code nodeExists} on this node's path name may
+     * return {@code true}, and a subsequent call to {@code node} on this
+     * path name may return a (different) {@code Preferences} instance
      * representing a non-empty collection of preferences and/or children.
      *
      * @throws BackingStoreException if this operation cannot be completed
@@ -1041,19 +1041,19 @@
     public abstract String absolutePath();
 
     /**
-     * Returns <tt>true</tt> if this preference node is in the user
-     * preference tree, <tt>false</tt> if it's in the system preference tree.
+     * Returns {@code true} if this preference node is in the user
+     * preference tree, {@code false} if it's in the system preference tree.
      *
-     * @return <tt>true</tt> if this preference node is in the user
-     *         preference tree, <tt>false</tt> if it's in the system
+     * @return {@code true} if this preference node is in the user
+     *         preference tree, {@code false} if it's in the system
      *         preference tree.
      */
     public abstract boolean isUserNode();
 
     /**
      * Returns a string representation of this preferences node,
-     * as if computed by the expression:<tt>(this.isUserNode() ? "User" :
-     * "System") + " Preference Node: " + this.absolutePath()</tt>.
+     * as if computed by the expression:{@code (this.isUserNode() ? "User" :
+     * "System") + " Preference Node: " + this.absolutePath()}.
      */
     public abstract String toString();
 
@@ -1086,9 +1086,9 @@
     /**
      * Ensures that future reads from this preference node and its
      * descendants reflect any changes that were committed to the persistent
-     * store (from any VM) prior to the <tt>sync</tt> invocation.  As a
+     * store (from any VM) prior to the {@code sync} invocation.  As a
      * side-effect, forces any changes in the contents of this preference node
-     * and its descendants to the persistent store, as if the <tt>flush</tt>
+     * and its descendants to the persistent store, as if the {@code flush}
      * method had been invoked on this node.
      *
      * @throws BackingStoreException if this operation cannot be completed
@@ -1107,7 +1107,7 @@
      * node, or when the value associated with a preference is changed.
      * (Preference change events are <i>not</i> generated by the {@link
      * #removeNode()} method, which generates a <i>node change event</i>.
-     * Preference change events <i>are</i> generated by the <tt>clear</tt>
+     * Preference change events <i>are</i> generated by the {@code clear}
      * method.)
      *
      * <p>Events are only guaranteed for changes made within the same JVM
@@ -1118,7 +1118,7 @@
      * desiring such events must register with each descendant.
      *
      * @param pcl The preference change listener to add.
-     * @throws NullPointerException if <tt>pcl</tt> is null.
+     * @throws NullPointerException if {@code pcl} is null.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @see #removePreferenceChangeListener(PreferenceChangeListener)
@@ -1132,7 +1132,7 @@
      * receives preference change events.
      *
      * @param pcl The preference change listener to remove.
-     * @throws IllegalArgumentException if <tt>pcl</tt> was not a registered
+     * @throws IllegalArgumentException if {@code pcl} was not a registered
      *         preference change listener on this node.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
@@ -1163,8 +1163,8 @@
      * circumstances, implementations are neither required to generate node
      * change events nor prohibited from doing so.
      *
-     * @param ncl The <tt>NodeChangeListener</tt> to add.
-     * @throws NullPointerException if <tt>ncl</tt> is null.
+     * @param ncl The {@code NodeChangeListener} to add.
+     * @throws NullPointerException if {@code ncl} is null.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @see #removeNodeChangeListener(NodeChangeListener)
@@ -1173,12 +1173,12 @@
     public abstract void addNodeChangeListener(NodeChangeListener ncl);
 
     /**
-     * Removes the specified <tt>NodeChangeListener</tt>, so it no longer
+     * Removes the specified {@code NodeChangeListener}, so it no longer
      * receives change events.
      *
-     * @param ncl The <tt>NodeChangeListener</tt> to remove.
-     * @throws IllegalArgumentException if <tt>ncl</tt> was not a registered
-     *         <tt>NodeChangeListener</tt> on this node.
+     * @param ncl The {@code NodeChangeListener} to remove.
+     * @throws IllegalArgumentException if {@code ncl} was not a registered
+     *         {@code NodeChangeListener} on this node.
      * @throws IllegalStateException if this node (or an ancestor) has been
      *         removed with the {@link #removeNode()} method.
      * @see #addNodeChangeListener(NodeChangeListener)
@@ -1206,7 +1206,7 @@
      *
      * @param os the output stream on which to emit the XML document.
      * @throws IOException if writing to the specified output stream
-     *         results in an <tt>IOException</tt>.
+     *         results in an {@code IOException}.
      * @throws BackingStoreException if preference data cannot be read from
      *         backing store.
      * @see    #importPreferences(InputStream)
@@ -1237,7 +1237,7 @@
      *
      * @param os the output stream on which to emit the XML document.
      * @throws IOException if writing to the specified output stream
-     *         results in an <tt>IOException</tt>.
+     *         results in an {@code IOException}.
      * @throws BackingStoreException if preference data cannot be read from
      *         backing store.
      * @throws IllegalStateException if this node (or an ancestor) has been
@@ -1273,11 +1273,11 @@
      *
      * @param is the input stream from which to read the XML document.
      * @throws IOException if reading from the specified input stream
-     *         results in an <tt>IOException</tt>.
+     *         results in an {@code IOException}.
      * @throws InvalidPreferencesFormatException Data on input stream does not
      *         constitute a valid XML document with the mandated document type.
      * @throws SecurityException If a security manager is present and
-     *         it denies <tt>RuntimePermission("preferences")</tt>.
+     *         it denies {@code RuntimePermission("preferences")}.
      * @see    RuntimePermission
      */
     public static void importPreferences(InputStream is)
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/PreferencesFactory.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/PreferencesFactory.java	Mon Aug 10 14:05:37 2015 +0300
@@ -29,12 +29,12 @@
 /**
  * A factory object that generates Preferences objects.  Providers of
  * new {@link Preferences} implementations should provide corresponding
- * <tt>PreferencesFactory</tt> implementations so that the new
- * <tt>Preferences</tt> implementation can be installed in place of the
+ * {@code PreferencesFactory} implementations so that the new
+ * {@code Preferences} implementation can be installed in place of the
  * platform-specific default implementation.
  *
- * <p><strong>This class is for <tt>Preferences</tt> implementers only.
- * Normal users of the <tt>Preferences</tt> facility should have no need to
+ * <p><strong>This class is for {@code Preferences} implementers only.
+ * Normal users of the {@code Preferences} facility should have no need to
  * consult this documentation.</strong>
  *
  * @author  Josh Bloch
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/XmlSupport.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/XmlSupport.java	Mon Aug 10 14:05:37 2015 +0300
@@ -88,7 +88,7 @@
      * an XML document conforming to the definition in the Preferences spec.
      *
      * @throws IOException if writing to the specified output stream
-     *         results in an <tt>IOException</tt>.
+     *         results in an {@code IOException}.
      * @throws BackingStoreException if preference data cannot be read from
      *         backing store.
      * @throws IllegalStateException if this node (or an ancestor) has been
@@ -188,7 +188,7 @@
      * spec.
      *
      * @throws IOException if reading from the specified output stream
-     *         results in an <tt>IOException</tt>.
+     *         results in an {@code IOException}.
      * @throws InvalidPreferencesFormatException Data on input stream does not
      *         constitute a valid XML document with the mandated document type.
      */
@@ -337,7 +337,7 @@
      * as the internal (undocumented) format for FileSystemPrefs.
      *
      * @throws IOException if writing to the specified output stream
-     *         results in an <tt>IOException</tt>.
+     *         results in an {@code IOException}.
      */
     static void exportMap(OutputStream os, Map<String, String> map) throws IOException {
         Document doc = createPrefsDoc("map");
@@ -363,7 +363,7 @@
      * the key-value pairs int the XML-document when this method returns.)
      *
      * @throws IOException if reading from the specified output stream
-     *         results in an <tt>IOException</tt>.
+     *         results in an {@code IOException}.
      * @throws InvalidPreferencesFormatException Data on input stream does not
      *         constitute a valid XML document with the mandated document type.
      */
--- a/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java	Mon Aug 10 14:05:37 2015 +0300
@@ -33,10 +33,10 @@
 import sun.util.logging.PlatformLogger;
 
 /**
- * Windows registry based implementation of  <tt>Preferences</tt>.
- * <tt>Preferences</tt>' <tt>systemRoot</tt> and <tt>userRoot</tt> are stored in
- * <tt>HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs</tt> and
- * <tt>HKEY_CURRENT_USER\Software\JavaSoft\Prefs</tt> correspondingly.
+ * Windows registry based implementation of  {@code Preferences}.
+ * {@code Preferences}' {@code systemRoot} and {@code userRoot} are stored in
+ * {@code HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs} and
+ * {@code HKEY_CURRENT_USER\Software\JavaSoft\Prefs} correspondingly.
  *
  * @author  Konstantin Kladko
  * @see Preferences
@@ -60,31 +60,31 @@
     private static PlatformLogger logger;
 
     /**
-     * Windows registry path to <tt>Preferences</tt>'s root nodes.
+     * Windows registry path to {@code Preferences}'s root nodes.
      */
     private static final byte[] WINDOWS_ROOT_PATH =
         stringToByteArray("Software\\JavaSoft\\Prefs");
 
     /**
-     * Windows handles to <tt>HKEY_CURRENT_USER</tt> and
-     * <tt>HKEY_LOCAL_MACHINE</tt> hives.
+     * Windows handles to {@code HKEY_CURRENT_USER} and
+     * {@code HKEY_LOCAL_MACHINE} hives.
      */
     private static final int HKEY_CURRENT_USER = 0x80000001;
     private static final int HKEY_LOCAL_MACHINE = 0x80000002;
 
     /**
-     * Mount point for <tt>Preferences</tt>'  user root.
+     * Mount point for {@code Preferences}'  user root.
      */
     private static final int USER_ROOT_NATIVE_HANDLE = HKEY_CURRENT_USER;
 
     /**
-     * Mount point for <tt>Preferences</tt>'  system root.
+     * Mount point for {@code Preferences}'  system root.
      */
     private static final int SYSTEM_ROOT_NATIVE_HANDLE = HKEY_LOCAL_MACHINE;
 
     /**
      * Maximum byte-encoded path length for Windows native functions,
-     * ending <tt>null</tt> character not included.
+     * ending {@code null} character not included.
      */
     private static final int MAX_WINDOWS_PATH_LENGTH = 256;
 
@@ -388,7 +388,7 @@
     }
 
     /**
-     * Constructs a <tt>WindowsPreferences</tt> node, creating underlying
+     * Constructs a {@code WindowsPreferences} node, creating underlying
      * Windows registry node and all its Windows parents, if they are not yet
      * created.
      * Logs a warning message, if Windows Registry is unavailable.
@@ -617,7 +617,7 @@
     }
 
      /**
-     * Implements <tt>AbstractPreferences</tt> <tt>putSpi()</tt> method.
+     * Implements {@code AbstractPreferences} {@code putSpi()} method.
      * Puts name-value pair into the underlying Windows registry node.
      * Logs a warning, if Windows registry is unavailable.
      * @see #getSpi(String)
@@ -645,7 +645,7 @@
     }
 
     /**
-     * Implements <tt>AbstractPreferences</tt> <tt>getSpi()</tt> method.
+     * Implements {@code AbstractPreferences} {@code getSpi()} method.
      * Gets a string value from the underlying Windows registry node.
      * Logs a warning, if Windows registry is unavailable.
      * @see #putSpi(String, String)
@@ -666,7 +666,7 @@
     }
 
     /**
-     * Implements <tt>AbstractPreferences</tt> <tt>removeSpi()</tt> method.
+     * Implements {@code AbstractPreferences} {@code removeSpi()} method.
      * Deletes a string name-value pair from the underlying Windows registry
      * node, if this value still exists.
      * Logs a warning, if Windows registry is unavailable or key has already
@@ -692,7 +692,7 @@
     }
 
     /**
-     * Implements <tt>AbstractPreferences</tt> <tt>keysSpi()</tt> method.
+     * Implements {@code AbstractPreferences} {@code keysSpi()} method.
      * Gets value names from the underlying Windows registry node.
      * Throws a BackingStoreException and logs a warning, if
      * Windows registry is unavailable.
@@ -744,7 +744,7 @@
     }
 
     /**
-     * Implements <tt>AbstractPreferences</tt> <tt>childrenNamesSpi()</tt> method.
+     * Implements {@code AbstractPreferences} {@code childrenNamesSpi()} method.
      * Calls Windows registry to retrive children of this node.
      * Throws a BackingStoreException and logs a warning message,
      * if Windows registry is not available.
@@ -798,7 +798,7 @@
     }
 
     /**
-     * Implements <tt>Preferences</tt> <tt>flush()</tt> method.
+     * Implements {@code Preferences} {@code flush()} method.
      * Flushes Windows registry changes to disk.
      * Throws a BackingStoreException and logs a warning message if Windows
      * registry is not available.
@@ -837,7 +837,7 @@
 
 
     /**
-     * Implements <tt>Preferences</tt> <tt>sync()</tt> method.
+     * Implements {@code Preferences} {@code sync()} method.
      * Flushes Windows registry changes to disk. Equivalent to flush().
      * @see flush()
      */
@@ -848,7 +848,7 @@
     }
 
     /**
-     * Implements <tt>AbstractPreferences</tt> <tt>childSpi()</tt> method.
+     * Implements {@code AbstractPreferences} {@code childSpi()} method.
      * Constructs a child node with a
      * given name and creates its underlying Windows registry node,
      * if it does not exist.
@@ -859,7 +859,7 @@
     }
 
     /**
-     * Implements <tt>AbstractPreferences</tt> <tt>removeNodeSpi()</tt> method.
+     * Implements {@code AbstractPreferences} {@code removeNodeSpi()} method.
      * Deletes underlying Windows registry node.
      * Throws a BackingStoreException and logs a warning, if Windows registry
      * is not available.
@@ -956,7 +956,7 @@
      * "A" is encoded as "/A". Character '\' is encoded as '//',
      * '/' is encoded as '\'.
      * The constructed string is converted to byte array by truncating the
-     * highest byte and adding the terminating <tt>null</tt> character.
+     * highest byte and adding the terminating {@code null} character.
      * <p>
      * <i>altBase64</i>  encoding is used, if java string does contain at least
      * one character less, than 0x0020, or greater, than 0x007f.
--- a/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferencesFactory.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferencesFactory.java	Mon Aug 10 14:05:37 2015 +0300
@@ -25,7 +25,7 @@
 package java.util.prefs;
 
 /**
- * Implementation of  <tt>PreferencesFactory</tt> to return
+ * Implementation of  {@code PreferencesFactory} to return
  * WindowsPreferences objects.
  *
  * @author  Konstantin Kladko
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbCred.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbCred.java	Mon Aug 10 14:05:37 2015 +0300
@@ -34,8 +34,6 @@
 import sun.security.krb5.internal.*;
 import sun.security.krb5.internal.crypto.KeyUsage;
 import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
 
 import sun.security.util.DerValue;
 
@@ -65,7 +63,6 @@
 
         PrincipalName client = tgt.getClient();
         PrincipalName tgService = tgt.getServer();
-        PrincipalName server = serviceTicket.getServer();
         if (!serviceTicket.getClient().equals(client))
             throw new KrbException(Krb5.KRB_ERR_GENERIC,
                                 "Client principal does not match");
@@ -78,28 +75,10 @@
         options.set(KDCOptions.FORWARDED, true);
         options.set(KDCOptions.FORWARDABLE, true);
 
-        HostAddresses sAddrs = null;
-
-        // GSSName.NT_HOSTBASED_SERVICE should display with KRB_NT_SRV_HST
-        if (server.getNameType() == PrincipalName.KRB_NT_SRV_HST) {
-            sAddrs = new HostAddresses(server);
-        } else if (server.getNameType() == PrincipalName.KRB_NT_UNKNOWN) {
-            // Sometimes this is also a server
-            if (server.getNameStrings().length >= 2) {
-                String host = server.getNameStrings()[1];
-                try {
-                    InetAddress[] addr = InetAddress.getAllByName(host);
-                    if (addr != null && addr.length > 0) {
-                        sAddrs = new HostAddresses(addr);
-                    }
-                } catch (UnknownHostException ioe) {
-                    // maybe we guessed wrong, let sAddrs be null
-                }
-            }
-        }
-
         KrbTgsReq tgsReq = new KrbTgsReq(options, tgt, tgService,
-                                         null, null, null, null, sAddrs, null, null, null);
+                null, null, null, null,
+                null,   // No easy way to get addresses right
+                null, null, null);
         credMessg = createMessage(tgsReq.sendAndGetCreds(), key);
 
         obuf = credMessg.asn1Encode();
@@ -111,7 +90,6 @@
         EncryptionKey sessionKey
             = delegatedCreds.getSessionKey();
         PrincipalName princ = delegatedCreds.getClient();
-        Realm realm = princ.getRealm();
         PrincipalName tgService = delegatedCreds.getServer();
 
         KrbCredInfo credInfo = new KrbCredInfo(sessionKey,
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddress.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddress.java	Mon Aug 10 14:05:37 2015 +0300
@@ -39,6 +39,7 @@
 import java.net.Inet6Address;
 import java.net.UnknownHostException;
 import java.io.IOException;
+import java.util.Arrays;
 
 /**
  * Implements the ASN.1 HostAddress type.
@@ -295,4 +296,11 @@
         }
     }
 
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(Arrays.toString(address));
+        sb.append('(').append(addrType).append(')');
+        return sb.toString();
+    }
 }
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java	Mon Aug 10 14:05:37 2015 +0300
@@ -338,4 +338,9 @@
         for (int i = 0; i < inetAddresses.length; i++)
             addresses[i] = new HostAddress(inetAddresses[i]);
     }
+
+    @Override
+    public String toString() {
+        return Arrays.toString(addresses);
+    }
 }
--- a/jdk/src/java.sql/share/classes/javax/sql/RowSet.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/java.sql/share/classes/javax/sql/RowSet.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1477,7 +1477,7 @@
 
   /**
      * Sets the designated parameter to a <code>InputStream</code> object.
-     * The "{@code InputStream} must contain  the number
+     * The {@code InputStream} must contain  the number
      * of characters specified by length, otherwise a <code>SQLException</code> will be
      * generated when the <code>CallableStatement</code> is executed.
      * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
--- a/jdk/src/jdk.charsets/share/classes/sun/nio/cs/ext/JISAutoDetect.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/src/jdk.charsets/share/classes/sun/nio/cs/ext/JISAutoDetect.java	Mon Aug 10 14:05:37 2015 +0300
@@ -79,32 +79,6 @@
         throw new UnsupportedOperationException();
     }
 
-    /**
-     * accessor methods used to share byte masking tables
-     * with the sun.io JISAutoDetect implementation
-     */
-
-    public static byte[] getByteMask1() {
-        return Decoder.maskTable1;
-    }
-
-    public static byte[] getByteMask2() {
-        return Decoder.maskTable2;
-    }
-
-    public final static boolean canBeSJIS1B(int mask) {
-        return (mask & SJIS1B_MASK) != 0;
-    }
-
-    public final static boolean canBeEUCJP(int mask) {
-        return (mask & EUCJP_MASK) != 0;
-    }
-
-    public final static boolean canBeEUCKana(int mask1, int mask2) {
-        return ((mask1 & EUCJP_KANA1_MASK) != 0)
-            && ((mask2 & EUCJP_KANA2_MASK) != 0);
-    }
-
     // A heuristic algorithm for guessing if EUC-decoded text really
     // might be Japanese text.  Better heuristics are possible...
     private static boolean looksLikeJapanese(CharBuffer cb) {
@@ -144,9 +118,10 @@
             src.position(p);
         }
 
-        private CoderResult decodeLoop(Charset cs,
+        private CoderResult decodeLoop(DelegatableDecoder decoder,
                                        ByteBuffer src, CharBuffer dst) {
-            detectedDecoder = (DelegatableDecoder) cs.newDecoder();
+            ((CharsetDecoder)decoder).reset();
+            detectedDecoder = decoder;
             return detectedDecoder.decodeLoop(src, dst);
         }
 
@@ -157,7 +132,9 @@
                 // All ASCII?
                 if (! src.hasRemaining())
                     return CoderResult.UNDERFLOW;
-                if (! dst.hasRemaining())
+                // Overflow only if there is still ascii but no out buffer.
+                if (!dst.hasRemaining() &&
+                    isPlainASCII(src.get(src.position())))
                     return CoderResult.OVERFLOW;
 
                 // We need to perform double, not float, arithmetic; otherwise
@@ -172,7 +149,7 @@
                 ByteBuffer src2022 = src.asReadOnlyBuffer();
                 CoderResult res2022 = dd2022.decodeLoop(src2022, sandbox);
                 if (! res2022.isError())
-                    return decodeLoop(cs2022, src, dst);
+                    return decodeLoop(dd2022, src, dst);
 
                 // We must choose between EUC and SJIS
                 Charset csEUCJ = Charset.forName(EUCJPName);
@@ -180,30 +157,30 @@
 
                 DelegatableDecoder ddEUCJ
                     = (DelegatableDecoder) csEUCJ.newDecoder();
+                DelegatableDecoder ddSJIS
+                    = (DelegatableDecoder) csSJIS.newDecoder();
+
                 ByteBuffer srcEUCJ = src.asReadOnlyBuffer();
                 sandbox.clear();
                 CoderResult resEUCJ = ddEUCJ.decodeLoop(srcEUCJ, sandbox);
                 // If EUC decoding fails, must be SJIS
                 if (resEUCJ.isError())
-                    return decodeLoop(csSJIS, src, dst);
-
-                DelegatableDecoder ddSJIS
-                    = (DelegatableDecoder) csSJIS.newDecoder();
+                    return decodeLoop(ddSJIS, src, dst);
                 ByteBuffer srcSJIS = src.asReadOnlyBuffer();
                 CharBuffer sandboxSJIS = CharBuffer.allocate(cbufsiz);
                 CoderResult resSJIS = ddSJIS.decodeLoop(srcSJIS, sandboxSJIS);
                 // If SJIS decoding fails, must be EUC
                 if (resSJIS.isError())
-                    return decodeLoop(csEUCJ, src, dst);
+                    return decodeLoop(ddEUCJ, src, dst);
 
                 // From here on, we have some ambiguity, and must guess.
 
                 // We prefer input that does not appear to end mid-character.
                 if (srcEUCJ.position() > srcSJIS.position())
-                    return decodeLoop(csEUCJ, src, dst);
+                    return decodeLoop(ddEUCJ, src, dst);
 
                 if (srcEUCJ.position() < srcSJIS.position())
-                    return decodeLoop(csSJIS, src, dst);
+                    return decodeLoop(ddSJIS, src, dst);
 
                 // end-of-input is after the first byte of the first char?
                 if (src.position() == srcEUCJ.position())
@@ -211,8 +188,8 @@
 
                 // Use heuristic knowledge of typical Japanese text
                 sandbox.flip();
-                Charset guess = looksLikeJapanese(sandbox) ? csEUCJ : csSJIS;
-                return decodeLoop(guess, src, dst);
+                return decodeLoop(looksLikeJapanese(sandbox) ? ddEUCJ : ddSJIS,
+                                  src, dst);
             }
 
             return detectedDecoder.decodeLoop(src, dst);
@@ -267,140 +244,5 @@
                 return("EUC_JP");
         }
 
-        // Mask tables - each entry indicates possibility of first or
-        // second byte being SJIS or EUC_JP
-        private static final byte maskTable1[] = {
-            0, 0, 0, 0, // 0x00 - 0x03
-            0, 0, 0, 0, // 0x04 - 0x07
-            0, 0, 0, 0, // 0x08 - 0x0b
-            0, 0, 0, 0, // 0x0c - 0x0f
-            0, 0, 0, 0, // 0x10 - 0x13
-            0, 0, 0, 0, // 0x14 - 0x17
-            0, 0, 0, 0, // 0x18 - 0x1b
-            0, 0, 0, 0, // 0x1c - 0x1f
-            0, 0, 0, 0, // 0x20 - 0x23
-            0, 0, 0, 0, // 0x24 - 0x27
-            0, 0, 0, 0, // 0x28 - 0x2b
-            0, 0, 0, 0, // 0x2c - 0x2f
-            0, 0, 0, 0, // 0x30 - 0x33
-            0, 0, 0, 0, // 0x34 - 0x37
-            0, 0, 0, 0, // 0x38 - 0x3b
-            0, 0, 0, 0, // 0x3c - 0x3f
-            0, 0, 0, 0, // 0x40 - 0x43
-            0, 0, 0, 0, // 0x44 - 0x47
-            0, 0, 0, 0, // 0x48 - 0x4b
-            0, 0, 0, 0, // 0x4c - 0x4f
-            0, 0, 0, 0, // 0x50 - 0x53
-            0, 0, 0, 0, // 0x54 - 0x57
-            0, 0, 0, 0, // 0x58 - 0x5b
-            0, 0, 0, 0, // 0x5c - 0x5f
-            0, 0, 0, 0, // 0x60 - 0x63
-            0, 0, 0, 0, // 0x64 - 0x67
-            0, 0, 0, 0, // 0x68 - 0x6b
-            0, 0, 0, 0, // 0x6c - 0x6f
-            0, 0, 0, 0, // 0x70 - 0x73
-            0, 0, 0, 0, // 0x74 - 0x77
-            0, 0, 0, 0, // 0x78 - 0x7b
-            0, 0, 0, 0, // 0x7c - 0x7f
-            0, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK,   // 0x80 - 0x83
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x84 - 0x87
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x88 - 0x8b
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,   // 0x8c - 0x8f
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x90 - 0x93
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x94 - 0x97
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x98 - 0x9b
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x9c - 0x9f
-            0, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,  // 0xa0 - 0xa3
-            SJIS1B_MASK|EUCJP_MASK|EUCJP_KANA1_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,    // 0xa4 - 0xa7
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xa8 - 0xab
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xac - 0xaf
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xb0 - 0xb3
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xb4 - 0xb7
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xb8 - 0xbb
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xbc - 0xbf
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xc0 - 0xc3
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xc4 - 0xc7
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xc8 - 0xcb
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xcc - 0xcf
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xd0 - 0xd3
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xd4 - 0xd7
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xd8 - 0xdb
-            SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK,     // 0xdc - 0xdf
-            SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,     // 0xe0 - 0xe3
-            SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,     // 0xe4 - 0xe7
-            SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,     // 0xe8 - 0xeb
-            SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,     // 0xec - 0xef
-            SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,     // 0xf0 - 0xf3
-            SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,     // 0xf4 - 0xf7
-            SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,     // 0xf8 - 0xfb
-            SJIS2B_MASK|EUCJP_MASK, EUCJP_MASK, EUCJP_MASK, 0   // 0xfc - 0xff
-        };
-
-        private static final byte maskTable2[] = {
-            0, 0, 0, 0, // 0x00 - 0x03
-            0, 0, 0, 0, // 0x04 - 0x07
-            0, 0, 0, 0, // 0x08 - 0x0b
-            0, 0, 0, 0, // 0x0c - 0x0f
-            0, 0, 0, 0, // 0x10 - 0x13
-            0, 0, 0, 0, // 0x14 - 0x17
-            0, 0, 0, 0, // 0x18 - 0x1b
-            0, 0, 0, 0, // 0x1c - 0x1f
-            0, 0, 0, 0, // 0x20 - 0x23
-            0, 0, 0, 0, // 0x24 - 0x27
-            0, 0, 0, 0, // 0x28 - 0x2b
-            0, 0, 0, 0, // 0x2c - 0x2f
-            0, 0, 0, 0, // 0x30 - 0x33
-            0, 0, 0, 0, // 0x34 - 0x37
-            0, 0, 0, 0, // 0x38 - 0x3b
-            0, 0, 0, 0, // 0x3c - 0x3f
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x40 - 0x43
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x44 - 0x47
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x48 - 0x4b
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x4c - 0x4f
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x50 - 0x53
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x54 - 0x57
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x58 - 0x5b
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x5c - 0x5f
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x60 - 0x63
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x64 - 0x67
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x68 - 0x6b
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x6c - 0x6f
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x70 - 0x73
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x74 - 0x77
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x78 - 0x7b
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, 0,   // 0x7c - 0x7f
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x80 - 0x83
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x84 - 0x87
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x88 - 0x8b
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x8c - 0x8f
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x90 - 0x93
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x94 - 0x97
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x98 - 0x9b
-            SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x9c - 0x9f
-            SJIS2B_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xa0 - 0xa3
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xa4 - 0xa7
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xa8 - 0xab
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xac - 0xaf
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xb0 - 0xb3
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xb4 - 0xb7
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xb8 - 0xbb
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xbc - 0xbf
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xc0 - 0xc3
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xc4 - 0xc7
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xc8 - 0xcb
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xcc - 0xcf
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xd0 - 0xd3
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xd4 - 0xd7
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xd8 - 0xdb
-            SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xdc - 0xdf
-            SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xe0 - 0xe3
-            SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xe4 - 0xe7
-            SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xe8 - 0xeb
-            SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xec - 0xef
-            SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xf0 - 0xf3
-            SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,     // 0xf4 - 0xf7
-            SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK,     // 0xf8 - 0xfb
-            SJIS2B_MASK|EUCJP_MASK, EUCJP_MASK, EUCJP_MASK, 0   // 0xfc - 0xff
-        };
     }
 }
--- a/jdk/test/ProblemList.txt	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/ProblemList.txt	Mon Aug 10 14:05:37 2015 +0300
@@ -379,4 +379,7 @@
 # 8057732
 sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java    generic-all
 
+# 8132648
+sun/tools/jhsdb/BasicLauncherTest.java                  generic-all
+
 ############################################################################
--- a/jdk/test/TEST.groups	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/TEST.groups	Mon Aug 10 14:05:37 2015 +0300
@@ -28,14 +28,20 @@
 tier1 = \
     :jdk_lang \
     :jdk_util \
+    sun/nio/cs/ISO8859x.java \
+    java/nio/Buffer \
+    com/sun/crypto/provider/Cipher \
     :jdk_math
 
 tier2 = \
     :jdk_io \
     :jdk_nio \
+    -sun/nio/cs/ISO8859x.java \
+    -java/nio/Buffer \
     :jdk_net \
     :jdk_time \
     :jdk_security \
+    -com/sun/crypto/provider/Cipher \
     :jdk_text \
     :core_tools \
     :jdk_other \
@@ -43,7 +49,8 @@
 
 tier3 = \
     :jdk_rmi \
-    :jdk_beans
+    :jdk_beans \
+    :jdk_imageio
 
 ###############################################################################
 #
--- a/jdk/test/com/sun/jndi/dns/IPv6NameserverPlatformParsingTest.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/com/sun/jndi/dns/IPv6NameserverPlatformParsingTest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -31,25 +31,12 @@
 import com.sun.jndi.dns.DnsContext;
 
 /**
- * @test
  * @bug 6991580
  * @summary IPv6 Nameservers in resolv.conf throws NumberFormatException
- * @run main/manual IPv6NameserverPlatformParsingTest
- *
- * In order to run this test be sure to place, for example, the following
- * snippet into your platform's {@code /etc/resolv.conf}:
- * <pre>
- * nameserver 127.0.0.1
- * nameserver 2001:4860:4860::8888
- * nameserver [::1]:5353
- * nameserver 127.0.0.1:5353
- * </pre>
- *
- * Then, run this test as manual jtreg test.
  *
  * @author Severin Gehwolf
- *
  */
+
 public class IPv6NameserverPlatformParsingTest {
 
     private static boolean foundIPv6 = false;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/jndi/dns/Test6991580.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,358 @@
+
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.Button;
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.Panel;
+import java.awt.TextArea;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+/**
+ * @test
+ * @bug 6991580 8080108
+ * @requires os.family != "windows"
+ * @summary IPv6 Nameservers in resolv.conf throws NumberFormatException
+ * @build IPv6NameserverPlatformParsingTest
+ * @run main/manual Test6991580
+ */
+
+
+public class Test6991580 {
+
+   private static void init() throws Exception {
+    //*** Create instructions for the user here ***
+
+    String[] instructions =
+        {
+         "This test should only be run on non-Windows systems.",
+         "If your system doesn't meet this condition, press PASS.",
+         "To run the test follow these instructions:",
+         "1. Open a terminal window.",
+         "2. Make sure you have, for example, the following snippet "
+            + "into your platform's /etc/resolv.conf:",
+         "nameserver 127.0.0.1",
+         "nameserver 2001:4860:4860::8888",
+         "nameserver [::1]:5353",
+         "nameserver 127.0.0.1:5353",
+         "Modify the /etc/resolv.conf file if needed. "
+            + "Don't forget to save the original content of the file.",
+         "3. Type \"cd " + System.getProperty("test.classes") + "\".",
+         "4. Type \"" + System.getProperty("java.home") +
+                "/bin/java IPv6NameserverPlatformParsingTest\".",
+         "5. If you see",
+         "\"PASS: Found IPv6 address and DnsClient parsed it correctly.\"",
+         ", press PASS else press FAIL.",
+         "6. If you modified /etc/resolv.conf on the step #2, "
+            + "please, restore the original content of the file."
+        };
+
+    Sysout.createDialog( );
+    Sysout.printInstructions( instructions );
+   }
+
+ /*****************************************************
+     Standard Test Machinery Section
+      DO NOT modify anything in this section -- it's a
+      standard chunk of code which has all of the
+      synchronisation necessary for the test harness.
+      By keeping it the same in all tests, it is easier
+      to read and understand someone else's test, as
+      well as insuring that all tests behave correctly
+      with the test harness.
+     There is a section following this for test-defined
+      classes
+  ******************************************************/
+   private static boolean theTestPassed = false;
+   private static boolean testGeneratedInterrupt = false;
+   private static String failureMessage = "";
+
+   private static Thread mainThread = null;
+
+   private static int sleepTime = 300000;
+
+   public static void main( String args[] ) throws Exception
+    {
+      mainThread = Thread.currentThread();
+      try
+       {
+         init();
+       }
+      catch( TestPassedException e )
+       {
+         //The test passed, so just return from main and harness will
+         // interepret this return as a pass
+         return;
+       }
+      //At this point, neither test passed nor test failed has been
+      // called -- either would have thrown an exception and ended the
+      // test, so we know we have multiple threads.
+
+      //Test involves other threads, so sleep and wait for them to
+      // called pass() or fail()
+      try
+       {
+         Thread.sleep( sleepTime );
+         //Timed out, so fail the test
+         throw new RuntimeException( "Timed out after " + sleepTime/1000 + " seconds" );
+       }
+      catch (InterruptedException e)
+       {
+         if( ! testGeneratedInterrupt ) throw e;
+
+         //reset flag in case hit this code more than once for some reason (just safety)
+         testGeneratedInterrupt = false;
+         if ( theTestPassed == false )
+          {
+            throw new RuntimeException( failureMessage );
+          }
+       }
+
+    }//main
+
+   public static synchronized void setTimeoutTo( int seconds )
+    {
+      sleepTime = seconds * 1000;
+    }
+
+   public static synchronized void pass()
+    {
+      Sysout.println( "The test passed." );
+      Sysout.println( "The test is over, hit  Ctl-C to stop Java VM" );
+      //first check if this is executing in main thread
+      if ( mainThread == Thread.currentThread() )
+       {
+         //Still in the main thread, so set the flag just for kicks,
+         // and throw a test passed exception which will be caught
+         // and end the test.
+         theTestPassed = true;
+         throw new TestPassedException();
+       }
+      //pass was called from a different thread, so set the flag and interrupt
+      // the main thead.
+      theTestPassed = true;
+      testGeneratedInterrupt = true;
+      mainThread.interrupt();
+    }//pass()
+
+   public static synchronized void fail()
+    {
+      //test writer didn't specify why test failed, so give generic
+      fail( "it just plain failed! :-)" );
+    }
+
+   public static synchronized void fail( String whyFailed )
+    {
+      Sysout.println( "The test failed: " + whyFailed );
+      Sysout.println( "The test is over, hit  Ctl-C to stop Java VM" );
+      //check if this called from main thread
+      if ( mainThread == Thread.currentThread() )
+       {
+         //If main thread, fail now 'cause not sleeping
+         throw new RuntimeException( whyFailed );
+       }
+      theTestPassed = false;
+      testGeneratedInterrupt = true;
+      failureMessage = whyFailed;
+      mainThread.interrupt();
+    }//fail()
+
+ }
+
+//This exception is used to exit from any level of call nesting
+// when it's determined that the test has passed, and immediately
+// end the test.
+class TestPassedException extends RuntimeException
+ {
+ }
+
+//*********** End Standard Test Machinery Section **********
+
+
+/****************************************************
+ Standard Test Machinery
+ DO NOT modify anything below -- it's a standard
+  chunk of code whose purpose is to make user
+  interaction uniform, and thereby make it simpler
+  to read and understand someone else's test.
+ ****************************************************/
+
+/**
+ This is part of the standard test machinery.
+ It creates a dialog (with the instructions), and is the interface
+  for sending text messages to the user.
+ To print the instructions, send an array of strings to Sysout.createDialog
+  WithInstructions method.  Put one line of instructions per array entry.
+ To display a message for the tester to see, simply call Sysout.println
+  with the string to be displayed.
+ This mimics System.out.println but works within the test harness as well
+  as standalone.
+ */
+
+class Sysout
+ {
+   private static TestDialog dialog;
+
+   public static void createDialogWithInstructions( String[] instructions )
+    {
+      dialog = new TestDialog( new Frame(), "Instructions" );
+      dialog.printInstructions( instructions );
+      dialog.show();
+      println( "Any messages for the tester will display here." );
+    }
+
+   public static void createDialog( )
+    {
+      dialog = new TestDialog( new Frame(), "Instructions" );
+      String[] defInstr = { "Instructions will appear here. ", "" } ;
+      dialog.printInstructions( defInstr );
+      dialog.show();
+      println( "Any messages for the tester will display here." );
+    }
+
+
+   public static void printInstructions( String[] instructions )
+    {
+      dialog.printInstructions( instructions );
+    }
+
+
+   public static void println( String messageIn )
+    {
+      dialog.displayMessage( messageIn );
+    }
+
+ }// Sysout  class
+
+/**
+  This is part of the standard test machinery.  It provides a place for the
+   test instructions to be displayed, and a place for interactive messages
+   to the user to be displayed.
+  To have the test instructions displayed, see Sysout.
+  To have a message to the user be displayed, see Sysout.
+  Do not call anything in this dialog directly.
+  */
+class TestDialog extends Dialog implements ActionListener
+ {
+
+   TextArea instructionsText;
+   TextArea messageText;
+   int maxStringLength = 120;
+   Panel  buttonP = new Panel();
+   Button passB = new Button( "pass" );
+   Button failB = new Button( "fail" );
+
+   //DO NOT call this directly, go through Sysout
+   public TestDialog( Frame frame, String name )
+    {
+      super( frame, name );
+      int scrollBoth = TextArea.SCROLLBARS_BOTH;
+      instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
+      add( "North", instructionsText );
+
+      messageText = new TextArea( "", 5, maxStringLength, scrollBoth );
+      add("Center", messageText);
+
+      passB = new Button( "pass" );
+      passB.setActionCommand( "pass" );
+      passB.addActionListener( this );
+      buttonP.add( "East", passB );
+
+      failB = new Button( "fail" );
+      failB.setActionCommand( "fail" );
+      failB.addActionListener( this );
+      buttonP.add( "West", failB );
+
+      add( "South", buttonP );
+      pack();
+
+      show();
+    }// TestDialog()
+
+   //DO NOT call this directly, go through Sysout
+   public void printInstructions( String[] instructions )
+    {
+      //Clear out any current instructions
+      instructionsText.setText( "" );
+
+      //Go down array of instruction strings
+
+      String printStr, remainingStr;
+      for( int i=0; i < instructions.length; i++ )
+       {
+         //chop up each into pieces maxSringLength long
+         remainingStr = instructions[ i ];
+         while( remainingStr.length() > 0 )
+          {
+            //if longer than max then chop off first max chars to print
+            if( remainingStr.length() >= maxStringLength )
+             {
+               //Try to chop on a word boundary
+               int posOfSpace = remainingStr.
+                  lastIndexOf( ' ', maxStringLength - 1 );
+
+               if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1;
+
+               printStr = remainingStr.substring( 0, posOfSpace + 1 );
+               remainingStr = remainingStr.substring( posOfSpace + 1 );
+             }
+            //else just print
+            else
+             {
+               printStr = remainingStr;
+               remainingStr = "";
+             }
+
+            instructionsText.append( printStr + "\n" );
+
+          }// while
+
+       }// for
+
+    }//printInstructions()
+
+   //DO NOT call this directly, go through Sysout
+   public void displayMessage( String messageIn )
+    {
+      messageText.append( messageIn + "\n" );
+    }
+
+   //catch presses of the passed and failed buttons.
+   //simply call the standard pass() or fail() static methods of
+   //DialogOrient
+   @Override
+   public void actionPerformed( ActionEvent e )
+    {
+      if( "pass".equals(e.getActionCommand()) )
+       {
+         Test6991580.pass();
+       }
+      else
+       {
+         Test6991580.fail();
+       }
+    }
+
+ }
--- a/jdk/test/java/nio/file/Files/probeContentType/Basic.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/java/nio/file/Files/probeContentType/Basic.java	Mon Aug 10 14:05:37 2015 +0300
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887 8129632
+ * @bug 4313887 8129632 8129633
  * @summary Unit test for probeContentType method
  * @library ../..
  * @build Basic SimpleFileTypeDetector
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/testlibrary/CertificateBuilder.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,539 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.testlibrary;
+
+import java.io.*;
+import java.util.*;
+import java.security.*;
+import java.security.cert.X509Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.Extension;
+import javax.security.auth.x500.X500Principal;
+import java.math.BigInteger;
+
+import sun.security.util.DerOutputStream;
+import sun.security.util.DerValue;
+import sun.security.util.ObjectIdentifier;
+import sun.security.x509.AccessDescription;
+import sun.security.x509.AlgorithmId;
+import sun.security.x509.AuthorityInfoAccessExtension;
+import sun.security.x509.AuthorityKeyIdentifierExtension;
+import sun.security.x509.SubjectKeyIdentifierExtension;
+import sun.security.x509.BasicConstraintsExtension;
+import sun.security.x509.ExtendedKeyUsageExtension;
+import sun.security.x509.DNSName;
+import sun.security.x509.GeneralName;
+import sun.security.x509.GeneralNames;
+import sun.security.x509.KeyUsageExtension;
+import sun.security.x509.SerialNumber;
+import sun.security.x509.SubjectAlternativeNameExtension;
+import sun.security.x509.URIName;
+import sun.security.x509.KeyIdentifier;
+
+/**
+ * Helper class that builds and signs X.509 certificates.
+ *
+ * A CertificateBuilder is created with a default constructor, and then
+ * uses additional public methods to set the public key, desired validity
+ * dates, serial number and extensions.  It is expected that the caller will
+ * have generated the necessary key pairs prior to using a CertificateBuilder
+ * to generate certificates.
+ *
+ * The following methods are mandatory before calling build():
+ * <UL>
+ * <LI>{@link #setSubjectName(java.lang.String)}
+ * <LI>{@link #setPublicKey(java.security.PublicKey)}
+ * <LI>{@link #setNotBefore(java.util.Date)} and
+ * {@link #setNotAfter(java.util.Date)}, or
+ * {@link #setValidity(java.util.Date, java.util.Date)}
+ * <LI>{@link #setSerialNumber(java.math.BigInteger)}
+ * </UL><BR>
+ *
+ * Additionally, the caller can either provide a {@link List} of
+ * {@link Extension} objects, or use the helper classes to add specific
+ * extension types.
+ *
+ * When all required and desired parameters are set, the
+ * {@link #build(java.security.cert.X509Certificate, java.security.PrivateKey,
+ * java.lang.String)} method can be used to create the {@link X509Certificate}
+ * object.
+ *
+ * Multiple certificates may be cut from the same settings using subsequent
+ * calls to the build method.  Settings may be cleared using the
+ * {@link #reset()} method.
+ */
+public class CertificateBuilder {
+    private final CertificateFactory factory;
+
+    private X500Principal subjectName = null;
+    private BigInteger serialNumber = null;
+    private PublicKey publicKey = null;
+    private Date notBefore = null;
+    private Date notAfter = null;
+    private final Map<String, Extension> extensions = new HashMap<>();
+    private byte[] tbsCertBytes;
+    private byte[] signatureBytes;
+
+    /**
+     * Default constructor for a {@code CertificateBuilder} object.
+     *
+     * @throws CertificateException if the underlying {@link CertificateFactory}
+     * cannot be instantiated.
+     */
+    public CertificateBuilder() throws CertificateException {
+        factory = CertificateFactory.getInstance("X.509");
+    }
+
+    /**
+     * Set the subject name for the certificate.
+     *
+     * @param name An {@link X500Principal} to be used as the subject name
+     * on this certificate.
+     */
+    public void setSubjectName(X500Principal name) {
+        subjectName = name;
+    }
+
+    /**
+     * Set the subject name for the certificate.
+     *
+     * @param name The subject name in RFC 2253 format
+     */
+    public void setSubjectName(String name) {
+        subjectName = new X500Principal(name);
+    }
+
+    /**
+     * Set the public key for this certificate.
+     *
+     * @param pubKey The {@link PublicKey} to be used on this certificate.
+     */
+    public void setPublicKey(PublicKey pubKey) {
+        publicKey = Objects.requireNonNull(pubKey, "Caught null public key");
+    }
+
+    /**
+     * Set the NotBefore date on the certificate.
+     *
+     * @param nbDate A {@link Date} object specifying the start of the
+     * certificate validity period.
+     */
+    public void setNotBefore(Date nbDate) {
+        Objects.requireNonNull(nbDate, "Caught null notBefore date");
+        notBefore = (Date)nbDate.clone();
+    }
+
+    /**
+     * Set the NotAfter date on the certificate.
+     *
+     * @param naDate A {@link Date} object specifying the end of the
+     * certificate validity period.
+     */
+    public void setNotAfter(Date naDate) {
+        Objects.requireNonNull(naDate, "Caught null notAfter date");
+        notAfter = (Date)naDate.clone();
+    }
+
+    /**
+     * Set the validity period for the certificate
+     *
+     * @param nbDate A {@link Date} object specifying the start of the
+     * certificate validity period.
+     * @param naDate A {@link Date} object specifying the end of the
+     * certificate validity period.
+     */
+    public void setValidity(Date nbDate, Date naDate) {
+        setNotBefore(nbDate);
+        setNotAfter(naDate);
+    }
+
+    /**
+     * Set the serial number on the certificate.
+     *
+     * @param serial A serial number in {@link BigInteger} form.
+     */
+    public void setSerialNumber(BigInteger serial) {
+        Objects.requireNonNull(serial, "Caught null serial number");
+        serialNumber = serial;
+    }
+
+
+    /**
+     * Add a single extension to the certificate.
+     *
+     * @param ext The extension to be added.
+     */
+    public void addExtension(Extension ext) {
+        Objects.requireNonNull(ext, "Caught null extension");
+        extensions.put(ext.getId(), ext);
+    }
+
+    /**
+     * Add multiple extensions contained in a {@code List}.
+     *
+     * @param extList The {@link List} of extensions to be added to
+     * the certificate.
+     */
+    public void addExtensions(List<Extension> extList) {
+        Objects.requireNonNull(extList, "Caught null extension list");
+        for (Extension ext : extList) {
+            extensions.put(ext.getId(), ext);
+        }
+    }
+
+    /**
+     * Helper method to add DNSName types for the SAN extension
+     *
+     * @param dnsNames A {@code List} of names to add as DNSName types
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    public void addSubjectAltNameDNSExt(List<String> dnsNames) throws IOException {
+        if (!dnsNames.isEmpty()) {
+            GeneralNames gNames = new GeneralNames();
+            for (String name : dnsNames) {
+                gNames.add(new GeneralName(new DNSName(name)));
+            }
+            addExtension(new SubjectAlternativeNameExtension(false,
+                    gNames));
+        }
+    }
+
+    /**
+     * Helper method to add one or more OCSP URIs to the Authority Info Access
+     * certificate extension.
+     *
+     * @param locations A list of one or more OCSP responder URIs as strings
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    public void addAIAExt(List<String> locations)
+            throws IOException {
+        if (!locations.isEmpty()) {
+            List<AccessDescription> acDescList = new ArrayList<>();
+            for (String ocspUri : locations) {
+                acDescList.add(new AccessDescription(
+                        AccessDescription.Ad_OCSP_Id,
+                        new GeneralName(new URIName(ocspUri))));
+            }
+            addExtension(new AuthorityInfoAccessExtension(acDescList));
+        }
+    }
+
+    /**
+     * Set a Key Usage extension for the certificate.  The extension will
+     * be marked critical.
+     *
+     * @param bitSettings Boolean array for all nine bit settings in the order
+     * documented in RFC 5280 section 4.2.1.3.
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    public void addKeyUsageExt(boolean[] bitSettings) throws IOException {
+        addExtension(new KeyUsageExtension(bitSettings));
+    }
+
+    /**
+     * Set the Basic Constraints Extension for a certificate.
+     *
+     * @param crit {@code true} if critical, {@code false} otherwise
+     * @param isCA {@code true} if the extension will be on a CA certificate,
+     * {@code false} otherwise
+     * @param maxPathLen The maximum path length issued by this CA.  Values
+     * less than zero will omit this field from the resulting extension and
+     * no path length constraint will be asserted.
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    public void addBasicConstraintsExt(boolean crit, boolean isCA,
+            int maxPathLen) throws IOException {
+        addExtension(new BasicConstraintsExtension(crit, isCA, maxPathLen));
+    }
+
+    /**
+     * Add the Authority Key Identifier extension.
+     *
+     * @param authorityCert The certificate of the issuing authority.
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    public void addAuthorityKeyIdExt(X509Certificate authorityCert)
+            throws IOException {
+        addAuthorityKeyIdExt(authorityCert.getPublicKey());
+    }
+
+    /**
+     * Add the Authority Key Identifier extension.
+     *
+     * @param authorityKey The public key of the issuing authority.
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    public void addAuthorityKeyIdExt(PublicKey authorityKey) throws IOException {
+        KeyIdentifier kid = new KeyIdentifier(authorityKey);
+        addExtension(new AuthorityKeyIdentifierExtension(kid, null, null));
+    }
+
+    /**
+     * Add the Subject Key Identifier extension.
+     *
+     * @param subjectKey The public key to be used in the resulting certificate
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    public void addSubjectKeyIdExt(PublicKey subjectKey) throws IOException {
+        byte[] keyIdBytes = new KeyIdentifier(subjectKey).getIdentifier();
+        addExtension(new SubjectKeyIdentifierExtension(keyIdBytes));
+    }
+
+    /**
+     * Add the Extended Key Usage extension.
+     *
+     * @param ekuOids A {@link List} of object identifiers in string form.
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    public void addExtendedKeyUsageExt(List<String> ekuOids)
+            throws IOException {
+        if (!ekuOids.isEmpty()) {
+            Vector<ObjectIdentifier> oidVector = new Vector<>();
+            for (String oid : ekuOids) {
+                oidVector.add(new ObjectIdentifier(oid));
+            }
+            addExtension(new ExtendedKeyUsageExtension(oidVector));
+        }
+    }
+
+    /**
+     * Clear all settings and return the {@code CertificateBuilder} to
+     * its default state.
+     */
+    public void reset() {
+        extensions.clear();
+        subjectName = null;
+        notBefore = null;
+        notAfter = null;
+        serialNumber = null;
+        publicKey = null;
+        signatureBytes = null;
+        tbsCertBytes = null;
+    }
+
+    /**
+     * Build the certificate.
+     *
+     * @param issuerCert The certificate of the issuing authority, or
+     * {@code null} if the resulting certificate is self-signed.
+     * @param issuerKey The private key of the issuing authority
+     * @param algName The signature algorithm name
+     *
+     * @return The resulting {@link X509Certificate}
+     *
+     * @throws IOException if an encoding error occurs.
+     * @throws CertificateException If the certificate cannot be generated
+     * by the underlying {@link CertificateFactory}
+     * @throws NoSuchAlgorithmException If an invalid signature algorithm
+     * is provided.
+     */
+    public X509Certificate build(X509Certificate issuerCert,
+            PrivateKey issuerKey, String algName)
+            throws IOException, CertificateException, NoSuchAlgorithmException {
+        // TODO: add some basic checks (key usage, basic constraints maybe)
+
+        AlgorithmId signAlg = AlgorithmId.get(algName);
+        byte[] encodedCert = encodeTopLevel(issuerCert, issuerKey, signAlg);
+        ByteArrayInputStream bais = new ByteArrayInputStream(encodedCert);
+        return (X509Certificate)factory.generateCertificate(bais);
+    }
+
+    /**
+     * Encode the contents of the outer-most ASN.1 SEQUENCE:
+     *
+     * <PRE>
+     *  Certificate  ::=  SEQUENCE  {
+     *      tbsCertificate       TBSCertificate,
+     *      signatureAlgorithm   AlgorithmIdentifier,
+     *      signatureValue       BIT STRING  }
+     * </PRE>
+     *
+     * @param issuerCert The certificate of the issuing authority, or
+     * {@code null} if the resulting certificate is self-signed.
+     * @param issuerKey The private key of the issuing authority
+     * @param signAlg The signature algorithm object
+     *
+     * @return The DER-encoded X.509 certificate
+     *
+     * @throws CertificateException If an error occurs during the
+     * signing process.
+     * @throws IOException if an encoding error occurs.
+     */
+    private byte[] encodeTopLevel(X509Certificate issuerCert,
+            PrivateKey issuerKey, AlgorithmId signAlg)
+            throws CertificateException, IOException {
+        DerOutputStream outerSeq = new DerOutputStream();
+        DerOutputStream topLevelItems = new DerOutputStream();
+
+        tbsCertBytes = encodeTbsCert(issuerCert, signAlg);
+        topLevelItems.write(tbsCertBytes);
+        try {
+            signatureBytes = signCert(issuerKey, signAlg);
+        } catch (GeneralSecurityException ge) {
+            throw new CertificateException(ge);
+        }
+        signAlg.derEncode(topLevelItems);
+        topLevelItems.putBitString(signatureBytes);
+        outerSeq.write(DerValue.tag_Sequence, topLevelItems);
+
+        return outerSeq.toByteArray();
+    }
+
+    /**
+     * Encode the bytes for the TBSCertificate structure:
+     * <PRE>
+     *  TBSCertificate  ::=  SEQUENCE  {
+     *      version         [0]  EXPLICIT Version DEFAULT v1,
+     *      serialNumber         CertificateSerialNumber,
+     *      signature            AlgorithmIdentifier,
+     *      issuer               Name,
+     *      validity             Validity,
+     *      subject              Name,
+     *      subjectPublicKeyInfo SubjectPublicKeyInfo,
+     *      issuerUniqueID  [1]  IMPLICIT UniqueIdentifier OPTIONAL,
+     *                        -- If present, version MUST be v2 or v3
+     *      subjectUniqueID [2]  IMPLICIT UniqueIdentifier OPTIONAL,
+     *                        -- If present, version MUST be v2 or v3
+     *      extensions      [3]  EXPLICIT Extensions OPTIONAL
+     *                        -- If present, version MUST be v3
+     *      }
+     *
+     * @param issuerCert The certificate of the issuing authority, or
+     * {@code null} if the resulting certificate is self-signed.
+     * @param signAlg The signature algorithm object
+     *
+     * @return The DER-encoded bytes for the TBSCertificate structure
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    private byte[] encodeTbsCert(X509Certificate issuerCert,
+            AlgorithmId signAlg) throws IOException {
+        DerOutputStream tbsCertSeq = new DerOutputStream();
+        DerOutputStream tbsCertItems = new DerOutputStream();
+
+        // Hardcode to V3
+        byte[] v3int = {0x02, 0x01, 0x02};
+        tbsCertItems.write(DerValue.createTag(DerValue.TAG_CONTEXT, true,
+                (byte)0), v3int);
+
+        // Serial Number
+        SerialNumber sn = new SerialNumber(serialNumber);
+        sn.encode(tbsCertItems);
+
+        // Algorithm ID
+        signAlg.derEncode(tbsCertItems);
+
+        // Issuer Name
+        if (issuerCert != null) {
+            tbsCertItems.write(
+                    issuerCert.getSubjectX500Principal().getEncoded());
+        } else {
+            // Self-signed
+            tbsCertItems.write(subjectName.getEncoded());
+        }
+
+        // Validity period (set as UTCTime)
+        DerOutputStream valSeq = new DerOutputStream();
+        valSeq.putUTCTime(notBefore);
+        valSeq.putUTCTime(notAfter);
+        tbsCertItems.write(DerValue.tag_Sequence, valSeq);
+
+        // Subject Name
+        tbsCertItems.write(subjectName.getEncoded());
+
+        // SubjectPublicKeyInfo
+        tbsCertItems.write(publicKey.getEncoded());
+
+        // TODO: Extensions!
+        encodeExtensions(tbsCertItems);
+
+        // Wrap it all up in a SEQUENCE and return the bytes
+        tbsCertSeq.write(DerValue.tag_Sequence, tbsCertItems);
+        return tbsCertSeq.toByteArray();
+    }
+
+    /**
+     * Encode the extensions segment for an X.509 Certificate:
+     *
+     * <PRE>
+     *  Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension
+     *
+     *  Extension  ::=  SEQUENCE  {
+     *      extnID      OBJECT IDENTIFIER,
+     *      critical    BOOLEAN DEFAULT FALSE,
+     *      extnValue   OCTET STRING
+     *                  -- contains the DER encoding of an ASN.1 value
+     *                  -- corresponding to the extension type identified
+     *                  -- by extnID
+     *      }
+     * </PRE>
+     *
+     * @param tbsStream The {@code DerOutputStream} that holds the
+     * TBSCertificate contents.
+     *
+     * @throws IOException if an encoding error occurs.
+     */
+    private void encodeExtensions(DerOutputStream tbsStream)
+            throws IOException {
+        DerOutputStream extSequence = new DerOutputStream();
+        DerOutputStream extItems = new DerOutputStream();
+
+        for (Extension ext : extensions.values()) {
+            ext.encode(extItems);
+        }
+        extSequence.write(DerValue.tag_Sequence, extItems);
+        tbsStream.write(DerValue.createTag(DerValue.TAG_CONTEXT, true,
+                (byte)3), extSequence);
+    }
+
+    /**
+     * Digitally sign the X.509 certificate.
+     *
+     * @param issuerKey The private key of the issuing authority
+     * @param signAlg The signature algorithm object
+     *
+     * @return The digital signature bytes.
+     *
+     * @throws GeneralSecurityException If any errors occur during the
+     * digital signature process.
+     */
+    private byte[] signCert(PrivateKey issuerKey, AlgorithmId signAlg)
+            throws GeneralSecurityException {
+        Signature sig = Signature.getInstance(signAlg.getName());
+        sig.initSign(issuerKey);
+        sig.update(tbsCertBytes);
+        return sig.sign();
+    }
+ }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/testlibrary/SimpleOCSPServer.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,1540 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.testlibrary;
+
+import java.io.*;
+import java.net.*;
+import java.security.*;
+import java.security.cert.CRLReason;
+import java.security.cert.X509Certificate;
+import java.security.cert.Extension;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateEncodingException;
+import java.security.Signature;
+import java.util.*;
+import java.util.concurrent.*;
+import java.text.SimpleDateFormat;
+import java.math.BigInteger;
+
+import sun.security.x509.*;
+import sun.security.x509.PKIXExtensions;
+import sun.security.provider.certpath.ResponderId;
+import sun.security.provider.certpath.CertId;
+import sun.security.provider.certpath.OCSPResponse;
+import sun.security.provider.certpath.OCSPResponse.ResponseStatus;
+import sun.security.util.Debug;
+import sun.security.util.DerInputStream;
+import sun.security.util.DerOutputStream;
+import sun.security.util.DerValue;
+import sun.security.util.ObjectIdentifier;
+
+
+/**
+ * This is a simple OCSP server designed to listen and respond to incoming
+ * requests.
+ */
+public class SimpleOCSPServer {
+    private final Debug debug = Debug.getInstance("oserv");
+    private static final ObjectIdentifier OCSP_BASIC_RESPONSE_OID =
+            ObjectIdentifier.newInternal(
+                    new int[] { 1, 3, 6, 1, 5, 5, 7, 48, 1, 1});
+    private static final SimpleDateFormat utcDateFmt =
+            new SimpleDateFormat("MMM dd yyyy, HH:mm:ss z");
+
+    // CertStatus values
+    public static enum CertStatus {
+        CERT_STATUS_GOOD,
+        CERT_STATUS_REVOKED,
+        CERT_STATUS_UNKNOWN,
+    }
+
+    // Fields used for the networking portion of the responder
+    private ServerSocket servSocket;
+    private InetAddress listenAddress;
+    private int listenPort;
+
+    // Keystore information (certs, keys, etc.)
+    private KeyStore keystore;
+    private X509Certificate issuerCert;
+    private X509Certificate signerCert;
+    private PrivateKey signerKey;
+
+    // Fields used for the operational portions of the server
+    private boolean logEnabled = false;
+    private ExecutorService threadPool;
+    private volatile boolean started = false;
+    private volatile boolean receivedShutdown = false;
+    private long delayMsec = 0;
+
+    // Fields used in the generation of responses
+    private long nextUpdateInterval = -1;
+    private Date nextUpdate = null;
+    private ResponderId respId;
+    private AlgorithmId sigAlgId;
+    private Map<CertId, CertStatusInfo> statusDb =
+            Collections.synchronizedMap(new HashMap<>());
+
+    /**
+     * Construct a SimpleOCSPServer using keystore, password, and alias
+     * parameters.
+     *
+     * @param ks the keystore to be used
+     * @param password the password to access key material in the keystore
+     * @param issuerAlias the alias of the issuer certificate
+     * @param signerAlias the alias of the signer certificate and key.  A
+     * value of {@code null} means that the {@code issuerAlias} will be used
+     * to look up the signer key.
+     *
+     * @throws GeneralSecurityException if there are problems accessing the
+     * keystore or finding objects within the keystore.
+     * @throws IOException if a {@code ResponderId} cannot be generated from
+     * the signer certificate.
+     */
+    public SimpleOCSPServer(KeyStore ks, String password, String issuerAlias,
+            String signerAlias) throws GeneralSecurityException, IOException {
+        this(null, 0, ks, password, issuerAlias, signerAlias);
+    }
+
+    /**
+     * Construct a SimpleOCSPServer using specific network parameters,
+     * keystore, password, and alias.
+     *
+     * @param addr the address to bind the server to.  A value of {@code null}
+     * means the server will bind to all interfaces.
+     * @param port the port to listen on.  A value of {@code 0} will mean that
+     * the server will randomly pick an open ephemeral port to bind to.
+     * @param ks the keystore to be used
+     * @param password the password to access key material in the keystore
+     * @param issuerAlias the alias of the issuer certificate
+     * @param signerAlias the alias of the signer certificate and key.  A
+     * value of {@code null} means that the {@code issuerAlias} will be used
+     * to look up the signer key.
+     *
+     * @throws GeneralSecurityException if there are problems accessing the
+     * keystore or finding objects within the keystore.
+     * @throws IOException if a {@code ResponderId} cannot be generated from
+     * the signer certificate.
+     */
+    public SimpleOCSPServer(InetAddress addr, int port, KeyStore ks,
+            String password, String issuerAlias, String signerAlias)
+            throws GeneralSecurityException, IOException {
+        Objects.requireNonNull(ks, "Null keystore provided");
+        Objects.requireNonNull(issuerAlias, "Null issuerName provided");
+
+        utcDateFmt.setTimeZone(TimeZone.getTimeZone("GMT"));
+
+        keystore = ks;
+        issuerCert = (X509Certificate)ks.getCertificate(issuerAlias);
+        if (issuerCert == null) {
+            throw new IllegalArgumentException("Certificate for alias " +
+                    issuerAlias + " not found");
+        }
+
+        if (signerAlias != null) {
+            signerCert = (X509Certificate)ks.getCertificate(signerAlias);
+            if (signerCert == null) {
+                throw new IllegalArgumentException("Certificate for alias " +
+                    signerAlias + " not found");
+            }
+            signerKey = (PrivateKey)ks.getKey(signerAlias,
+                    password.toCharArray());
+            if (signerKey == null) {
+                throw new IllegalArgumentException("PrivateKey for alias " +
+                    signerAlias + " not found");
+            }
+        } else {
+            signerCert = issuerCert;
+            signerKey = (PrivateKey)ks.getKey(issuerAlias,
+                    password.toCharArray());
+            if (signerKey == null) {
+                throw new IllegalArgumentException("PrivateKey for alias " +
+                    issuerAlias + " not found");
+            }
+        }
+
+        sigAlgId = AlgorithmId.get("Sha256withRSA");
+        respId = new ResponderId(signerCert.getSubjectX500Principal());
+        listenAddress = addr;
+        listenPort = port;
+    }
+
+    /**
+     * Start the server.  The server will bind to the specified network
+     * address and begin listening for incoming connections.
+     *
+     * @throws IOException if any number of things go wonky.
+     */
+    public synchronized void start() throws IOException {
+        // You cannot start the server twice.
+        if (started) {
+            log("Server has already been started");
+            return;
+        } else {
+            started = true;
+        }
+
+        // Create and start the thread pool
+        threadPool = Executors.newFixedThreadPool(32, new ThreadFactory() {
+            @Override
+            public Thread newThread(Runnable r) {
+                Thread t = Executors.defaultThreadFactory().newThread(r);
+                t.setDaemon(true);
+                return t;
+            }
+        });
+
+        threadPool.submit(new Runnable() {
+            @Override
+            public void run() {
+                try (ServerSocket sSock = new ServerSocket()) {
+                    servSocket = sSock;
+                    servSocket.setReuseAddress(true);
+                    servSocket.setSoTimeout(500);
+                    servSocket.bind(new InetSocketAddress(listenAddress,
+                            listenPort), 128);
+                    log("Listening on " + servSocket.getLocalSocketAddress());
+
+                    // Update the listenPort with the new port number.  If
+                    // the server is restarted, it will bind to the same
+                    // port rather than picking a new one.
+                    listenPort = servSocket.getLocalPort();
+
+                    // Main dispatch loop
+                    while (!receivedShutdown) {
+                        try {
+                            Socket newConnection = servSocket.accept();
+                            threadPool.submit(new OcspHandler(newConnection));
+                        } catch (SocketTimeoutException timeout) {
+                            // Nothing to do here.  If receivedShutdown
+                            // has changed to true then the loop will
+                            // exit on its own.
+                        } catch (IOException ioe) {
+                            // Something bad happened, log and force a shutdown
+                            log("Unexpected Exception: " + ioe);
+                            stop();
+                        }
+                    }
+
+                    log("Shutting down...");
+                    threadPool.shutdown();
+                } catch (IOException ioe) {
+                    err(ioe);
+                }
+
+                // Reset state variables so the server can be restarted
+                receivedShutdown = false;
+                started = false;
+            }
+        });
+    }
+
+    /**
+     * Stop the OCSP server.
+     */
+    public synchronized void stop() {
+        if (started) {
+            receivedShutdown = true;
+            log("Received shutdown notification");
+        }
+    }
+
+    /**
+     * Print {@code SimpleOCSPServer} operating parameters.
+     *
+     * @return the {@code SimpleOCSPServer} operating parameters in
+     * {@code String} form.
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("OCSP Server:\n");
+        sb.append("----------------------------------------------\n");
+        sb.append("issuer: ").append(issuerCert.getSubjectX500Principal()).
+                append("\n");
+        sb.append("signer: ").append(signerCert.getSubjectX500Principal()).
+                append("\n");
+        sb.append("ResponderId: ").append(respId).append("\n");
+        sb.append("----------------------------------------------");
+
+        return sb.toString();
+    }
+
+    /**
+     * Helpful debug routine to hex dump byte arrays.
+     *
+     * @param data the array of bytes to dump to stdout.
+     *
+     * @return the hexdump of the byte array
+     */
+    private static String dumpHexBytes(byte[] data) {
+        return dumpHexBytes(data, 16, "\n", " ");
+    }
+
+    /**
+     *
+     * @param data the array of bytes to dump to stdout.
+     * @param itemsPerLine the number of bytes to display per line
+     * if the {@code lineDelim} character is blank then all bytes will be
+     * printed on a single line.
+     * @param lineDelim the delimiter between lines
+     * @param itemDelim the delimiter between bytes
+     *
+     * @return The hexdump of the byte array
+     */
+    private static String dumpHexBytes(byte[] data, int itemsPerLine,
+            String lineDelim, String itemDelim) {
+        StringBuilder sb = new StringBuilder();
+        if (data != null) {
+            for (int i = 0; i < data.length; i++) {
+                if (i % itemsPerLine == 0 && i != 0) {
+                    sb.append(lineDelim);
+                }
+                sb.append(String.format("%02X", data[i])).append(itemDelim);
+            }
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * Enable or disable the logging feature.
+     *
+     * @param enable {@code true} to enable logging, {@code false} to
+     * disable it.  The setting must be activated before the server calls
+     * its start method.  Any calls after that have no effect.
+     */
+    public void enableLog(boolean enable) {
+        if (!started) {
+            logEnabled = enable;
+        }
+    }
+
+    /**
+     * Sets the nextUpdate interval.  Intervals will be calculated relative
+     * to the server startup time.  When first set, the nextUpdate date is
+     * calculated based on the current time plus the interval.  After that,
+     * calls to getNextUpdate() will return this date if it is still
+     * later than current time.  If not, the Date will be updated to the
+     * next interval that is later than current time.  This value must be set
+     * before the server has had its start method called.  Calls made after
+     * the server has been started have no effect.
+     *
+     * @param interval the recurring time interval in seconds used to
+     * calculate nextUpdate times.   A value less than or equal to 0 will
+     * disable the nextUpdate feature.
+     */
+    public synchronized void setNextUpdateInterval(long interval) {
+        if (!started) {
+            if (interval <= 0) {
+                nextUpdateInterval = -1;
+                nextUpdate = null;
+                log("nexUpdate support has been disabled");
+            } else {
+                nextUpdateInterval = interval * 1000;
+                nextUpdate = new Date(System.currentTimeMillis() +
+                        nextUpdateInterval);
+                log("nextUpdate set to " + nextUpdate);
+            }
+        }
+    }
+
+    /**
+     * Return the nextUpdate {@code Date} object for this server.  If the
+     * nextUpdate date has already passed, set a new nextUpdate based on
+     * the nextUpdate interval and return that date.
+     *
+     * @return a {@code Date} object set to the nextUpdate field for OCSP
+     * responses.
+     */
+    private synchronized Date getNextUpdate() {
+        if (nextUpdate != null && nextUpdate.before(new Date())) {
+            long nuEpochTime = nextUpdate.getTime();
+            long currentTime = System.currentTimeMillis();
+
+            // Keep adding nextUpdate intervals until you reach a date
+            // that is later than current time.
+            while (currentTime >= nuEpochTime) {
+                nuEpochTime += nextUpdateInterval;
+            }
+
+            // Set the nextUpdate for future threads
+            nextUpdate = new Date(nuEpochTime);
+            log("nextUpdate updated to new value: " + nextUpdate);
+        }
+        return nextUpdate;
+    }
+
+    /**
+     * Add entries into the responder's status database.
+     *
+     * @param newEntries a map of {@code CertStatusInfo} objects, keyed on
+     * their serial number (as a {@code BigInteger}).  All serial numbers
+     * are assumed to have come from this responder's issuer certificate.
+     *
+     * @throws IOException if a CertId cannot be generated.
+     */
+    public void updateStatusDb(Map<BigInteger, CertStatusInfo> newEntries)
+            throws IOException {
+         if (newEntries != null) {
+            for (BigInteger serial : newEntries.keySet()) {
+                CertStatusInfo info = newEntries.get(serial);
+                if (info != null) {
+                    CertId cid = new CertId(issuerCert,
+                            new SerialNumber(serial));
+                    statusDb.put(cid, info);
+                    log("Added entry for serial " + serial + "(" +
+                            info.getType() + ")");
+                }
+            }
+        }
+    }
+
+    /**
+     * Check the status database for revocation information one one or more
+     * certificates.
+     *
+     * @param reqList the list of {@code LocalSingleRequest} objects taken
+     * from the incoming OCSP request.
+     *
+     * @return a {@code Map} of {@code CertStatusInfo} objects keyed by their
+     * {@code CertId} values, for each single request passed in.  Those
+     * CertIds not found in the statusDb will have returned List members with
+     * a status of UNKNOWN.
+     */
+    private Map<CertId, CertStatusInfo> checkStatusDb(
+            List<LocalOcspRequest.LocalSingleRequest> reqList) {
+        // TODO figure out what, if anything to do with request extensions
+        Map<CertId, CertStatusInfo> returnMap = new HashMap<>();
+
+        for (LocalOcspRequest.LocalSingleRequest req : reqList) {
+            CertId cid = req.getCertId();
+            CertStatusInfo info = statusDb.get(cid);
+            if (info != null) {
+                log("Status for SN " + cid.getSerialNumber() + ": " +
+                        info.getType());
+                returnMap.put(cid, info);
+            } else {
+                log("Status for SN " + cid.getSerialNumber() +
+                        " not found, using CERT_STATUS_UNKNOWN");
+                returnMap.put(cid,
+                        new CertStatusInfo(CertStatus.CERT_STATUS_UNKNOWN));
+            }
+        }
+
+        return Collections.unmodifiableMap(returnMap);
+    }
+
+    /**
+     * Set the digital signature algorithm used to sign OCSP responses.
+     *
+     * @param algName The algorithm name
+     *
+     * @throws NoSuchAlgorithmException if the algorithm name is invalid.
+     */
+    public void setSignatureAlgorithm(String algName)
+            throws NoSuchAlgorithmException {
+        if (!started) {
+            sigAlgId = AlgorithmId.get(algName);
+        }
+    }
+
+    /**
+     * Get the port the OCSP server is running on.
+     *
+     * @return the port that the OCSP server is running on, or -1 if the
+     * server has not yet been bound to a port.
+     */
+    public int getPort() {
+        if (servSocket != null && started) {
+            InetSocketAddress inetSock =
+                    (InetSocketAddress)servSocket.getLocalSocketAddress();
+            return inetSock.getPort();
+        } else {
+            return -1;
+        }
+    }
+
+    /**
+     * Set a delay between the reception of the request and production of
+     * the response.
+     *
+     * @param delayMillis the number of milliseconds to wait before acting
+     * on the incoming request.
+     */
+    public void setDelay(long delayMillis) {
+        if (!started) {
+            delayMsec = delayMillis > 0 ? delayMillis : 0;
+            if (delayMsec > 0) {
+                log("OCSP latency set to " + delayMsec + " milliseconds.");
+            } else {
+                log("OCSP latency disabled");
+            }
+        }
+    }
+
+    /**
+     * Log a message to stdout.
+     *
+     * @param message the message to log
+     */
+    private synchronized void log(String message) {
+        if (logEnabled || debug != null) {
+            System.out.println("[" + Thread.currentThread().getName() + "]: " +
+                    message);
+        }
+    }
+
+    /**
+     * Log an error message on the stderr stream.
+     *
+     * @param message the message to log
+     */
+    private static synchronized void err(String message) {
+        System.out.println("[" + Thread.currentThread().getName() + "]: " +
+                message);
+    }
+
+    /**
+     * Log exception information on the stderr stream.
+     *
+     * @param exc the exception to dump information about
+     */
+    private static synchronized void err(Throwable exc) {
+        System.out.print("[" + Thread.currentThread().getName() +
+                "]: Exception: ");
+        exc.printStackTrace(System.out);
+    }
+
+    /**
+     * The {@code CertStatusInfo} class defines an object used to return
+     * information from the internal status database.  The data in this
+     * object may be used to construct OCSP responses.
+     */
+    public static class CertStatusInfo {
+        private CertStatus certStatusType;
+        private CRLReason reason;
+        private Date revocationTime;
+
+        /**
+         * Create a Certificate status object by providing the status only.
+         * If the status is {@code REVOKED} then current time is assumed
+         * for the revocation time.
+         *
+         * @param statType the status for this entry.
+         */
+        public CertStatusInfo(CertStatus statType) {
+            this(statType, null, null);
+        }
+
+        /**
+         * Create a CertStatusInfo providing both type and revocation date
+         * (if applicable).
+         *
+         * @param statType the status for this entry.
+         * @param revDate if applicable, the date that revocation took place.
+         * A value of {@code null} indicates that current time should be used.
+         * If the value of {@code statType} is not {@code CERT_STATUS_REVOKED},
+         * then the {@code revDate} parameter is ignored.
+         */
+        public CertStatusInfo(CertStatus statType, Date revDate) {
+            this(statType, revDate, null);
+        }
+
+        /**
+         * Create a CertStatusInfo providing type, revocation date
+         * (if applicable) and revocation reason.
+         *
+         * @param statType the status for this entry.
+         * @param revDate if applicable, the date that revocation took place.
+         * A value of {@code null} indicates that current time should be used.
+         * If the value of {@code statType} is not {@code CERT_STATUS_REVOKED},
+         * then the {@code revDate} parameter is ignored.
+         * @param revReason the reason the certificate was revoked.  A value of
+         * {@code null} means that no reason was provided.
+         */
+        public CertStatusInfo(CertStatus statType, Date revDate,
+                CRLReason revReason) {
+            Objects.requireNonNull(statType, "Cert Status must be non-null");
+            certStatusType = statType;
+            switch (statType) {
+                case CERT_STATUS_GOOD:
+                case CERT_STATUS_UNKNOWN:
+                    revocationTime = null;
+                    break;
+                case CERT_STATUS_REVOKED:
+                    revocationTime = revDate != null ? (Date)revDate.clone() :
+                            new Date();
+                    break;
+                default:
+                    throw new IllegalArgumentException("Unknown status type: " +
+                            statType);
+            }
+        }
+
+        /**
+         * Get the cert status type
+         *
+         * @return the status applied to this object (e.g.
+         * {@code CERT_STATUS_GOOD}, {@code CERT_STATUS_UNKNOWN}, etc.)
+         */
+        public CertStatus getType() {
+            return certStatusType;
+        }
+
+        /**
+         * Get the revocation time (if applicable).
+         *
+         * @return the revocation time as a {@code Date} object, or
+         * {@code null} if not applicable (i.e. if the certificate hasn't been
+         * revoked).
+         */
+        public Date getRevocationTime() {
+            return (revocationTime != null ? (Date)revocationTime.clone() :
+                    null);
+        }
+
+        /**
+         * Get the revocation reason.
+         *
+         * @return the revocation reason, or {@code null} if one was not
+         * provided.
+         */
+        public CRLReason getRevocationReason() {
+            return reason;
+        }
+    }
+
+    /**
+     * Runnable task that handles incoming OCSP Requests and returns
+     * responses.
+     */
+    private class OcspHandler implements Runnable {
+        private final Socket sock;
+        InetSocketAddress peerSockAddr;
+
+        /**
+         * Construct an {@code OcspHandler}.
+         *
+         * @param incomingSocket the socket the server created on accept()
+         */
+        private OcspHandler(Socket incomingSocket) {
+            sock = incomingSocket;
+        }
+
+        /**
+         * Run the OCSP Request parser and construct a response to be sent
+         * back to the client.
+         */
+        @Override
+        public void run() {
+            // If we have implemented a delay to simulate network latency
+            // wait out the delay here before any other processing.
+            try {
+                if (delayMsec > 0) {
+                    Thread.sleep(delayMsec);
+                }
+            } catch (InterruptedException ie) {
+                // Just log the interrupted sleep
+                log("Delay of " + delayMsec + " milliseconds was interrupted");
+            }
+
+            try (Socket ocspSocket = sock;
+                    InputStream in = ocspSocket.getInputStream();
+                    OutputStream out = ocspSocket.getOutputStream()) {
+                peerSockAddr =
+                        (InetSocketAddress)ocspSocket.getRemoteSocketAddress();
+                log("Received incoming connection from " + peerSockAddr);
+                String[] headerTokens = readLine(in).split(" ");
+                LocalOcspRequest ocspReq = null;
+                LocalOcspResponse ocspResp = null;
+                ResponseStatus respStat = ResponseStatus.INTERNAL_ERROR;
+                try {
+                    if (headerTokens[0] != null) {
+                        switch (headerTokens[0]) {
+                            case "POST":
+                                    ocspReq = parseHttpOcspPost(in);
+                                break;
+                            case "GET":
+                                // req = parseHttpOcspGet(in);
+                                // TODO implement the GET parsing
+                                throw new IOException("GET method unsupported");
+                            default:
+                                respStat = ResponseStatus.MALFORMED_REQUEST;
+                                throw new IOException("Not a GET or POST");
+                        }
+                    } else {
+                        respStat = ResponseStatus.MALFORMED_REQUEST;
+                        throw new IOException("Unable to get HTTP method");
+                    }
+
+                    if (ocspReq != null) {
+                        log(ocspReq.toString());
+                        // Get responses for all CertIds in the request
+                        Map<CertId, CertStatusInfo> statusMap =
+                                checkStatusDb(ocspReq.getRequests());
+                        if (statusMap.isEmpty()) {
+                            respStat = ResponseStatus.UNAUTHORIZED;
+                        } else {
+                            ocspResp = new LocalOcspResponse(
+                                    ResponseStatus.SUCCESSFUL, statusMap,
+                                    ocspReq.getExtensions());
+                        }
+                    } else {
+                        respStat = ResponseStatus.MALFORMED_REQUEST;
+                        throw new IOException("Found null request");
+                    }
+                } catch (IOException | RuntimeException exc) {
+                    err(exc);
+                }
+                if (ocspResp == null) {
+                    ocspResp = new LocalOcspResponse(respStat);
+                }
+                sendResponse(out, ocspResp);
+            } catch (IOException | CertificateException exc) {
+                err(exc);
+            }
+        }
+
+        /**
+         * Send an OCSP response on an {@code OutputStream}.
+         *
+         * @param out the {@code OutputStream} on which to send the response.
+         * @param resp the OCSP response to send.
+         *
+         * @throws IOException if an encoding error occurs.
+         */
+        public void sendResponse(OutputStream out, LocalOcspResponse resp)
+                throws IOException {
+            StringBuilder sb = new StringBuilder();
+
+            byte[] respBytes;
+            try {
+                respBytes = resp.getBytes();
+            } catch (RuntimeException re) {
+                err(re);
+                return;
+            }
+
+            sb.append("HTTP/1.0 200 OK\r\n");
+            sb.append("Content-Type: application/ocsp-response\r\n");
+            sb.append("Content-Length: ").append(respBytes.length);
+            sb.append("\r\n\r\n");
+
+            out.write(sb.toString().getBytes("UTF-8"));
+            out.write(respBytes);
+            log(resp.toString());
+        }
+
+        /**
+         * Parse the incoming HTTP POST of an OCSP Request.
+         *
+         * @param inStream the input stream from the socket bound to this
+         * {@code OcspHandler}.
+         *
+         * @return the OCSP Request as a {@code LocalOcspRequest}
+         *
+         * @throws IOException if there are network related issues or problems
+         * occur during parsing of the OCSP request.
+         * @throws CertificateException if one or more of the certificates in
+         * the OCSP request cannot be read/parsed.
+         */
+        private LocalOcspRequest parseHttpOcspPost(InputStream inStream)
+                throws IOException, CertificateException {
+            boolean endOfHeader = false;
+            boolean properContentType = false;
+            int length = -1;
+
+            while (!endOfHeader) {
+                String[] lineTokens = readLine(inStream).split(" ");
+                if (lineTokens[0].isEmpty()) {
+                    endOfHeader = true;
+                } else if (lineTokens[0].equalsIgnoreCase("Content-Type:")) {
+                    if (lineTokens[1] == null ||
+                            !lineTokens[1].equals(
+                                    "application/ocsp-request")) {
+                        log("Unknown Content-Type: " +
+                                (lineTokens[1] != null ?
+                                        lineTokens[1] : "<NULL>"));
+                        return null;
+                    } else {
+                        properContentType = true;
+                        log("Content-Type = " + lineTokens[1]);
+                    }
+                } else if (lineTokens[0].equalsIgnoreCase("Content-Length:")) {
+                    if (lineTokens[1] != null) {
+                        length = Integer.parseInt(lineTokens[1]);
+                        log("Content-Length = " + length);
+                    }
+                }
+            }
+
+            // Okay, make sure we got what we needed from the header, then
+            // read the remaining OCSP Request bytes
+            if (properContentType && length >= 0) {
+                byte[] ocspBytes = new byte[length];
+                inStream.read(ocspBytes);
+                return new LocalOcspRequest(ocspBytes);
+            } else {
+                return null;
+            }
+        }
+
+        /**
+         * Read a line of text that is CRLF-delimited.
+         *
+         * @param is the {@code InputStream} tied to the socket
+         * for this {@code OcspHandler}
+         *
+         * @return a {@code String} consisting of the line of text
+         * read from the stream with the CRLF stripped.
+         *
+         * @throws IOException if any I/O error occurs.
+         */
+        private String readLine(InputStream is) throws IOException {
+            PushbackInputStream pbis = new PushbackInputStream(is);
+            ByteArrayOutputStream bos = new ByteArrayOutputStream();
+            boolean done = false;
+            while (!done) {
+                byte b = (byte)pbis.read();
+                if (b == '\r') {
+                    byte bNext = (byte)pbis.read();
+                    if (bNext == '\n' || bNext == -1) {
+                        done = true;
+                    } else {
+                        pbis.unread(bNext);
+                        bos.write(b);
+                    }
+                } else if (b == -1) {
+                    done = true;
+                } else {
+                    bos.write(b);
+                }
+            }
+
+            return new String(bos.toByteArray(), "UTF-8");
+        }
+    }
+
+
+    /**
+     * Simple nested class to handle OCSP requests without making
+     * changes to sun.security.provider.certpath.OCSPRequest
+     */
+    public class LocalOcspRequest {
+
+        private byte[] nonce;
+        private byte[] signature = null;
+        private AlgorithmId algId = null;
+        private int version = 0;
+        private GeneralName requestorName = null;
+        private Map<String, Extension> extensions = Collections.emptyMap();
+        private final List<LocalSingleRequest> requestList = new ArrayList<>();
+        private final List<X509Certificate> certificates = new ArrayList<>();
+
+        /**
+         * Construct a {@code LocalOcspRequest} from its DER encoding.
+         *
+         * @param requestBytes the DER-encoded bytes
+         *
+         * @throws IOException if decoding errors occur
+         * @throws CertificateException if certificates are found in the
+         * OCSP request and they do not parse correctly.
+         */
+        private LocalOcspRequest(byte[] requestBytes) throws IOException,
+                CertificateException {
+            Objects.requireNonNull(requestBytes, "Received null input");
+
+            DerInputStream dis = new DerInputStream(requestBytes);
+
+            // Parse the top-level structure, it should have no more than
+            // two elements.
+            DerValue[] topStructs = dis.getSequence(2);
+            for (DerValue dv : topStructs) {
+                if (dv.tag == DerValue.tag_Sequence) {
+                    parseTbsRequest(dv);
+                } else if (dv.isContextSpecific((byte)0)) {
+                    parseSignature(dv);
+                } else {
+                    throw new IOException("Unknown tag at top level: " +
+                            dv.tag);
+                }
+            }
+        }
+
+        /**
+         * Parse the signature block from an OCSP request
+         *
+         * @param sigSequence a {@code DerValue} containing the signature
+         * block at the outer sequence datum.
+         *
+         * @throws IOException if any non-certificate-based parsing errors occur
+         * @throws CertificateException if certificates are found in the
+         * OCSP request and they do not parse correctly.
+         */
+        private void parseSignature(DerValue sigSequence)
+                throws IOException, CertificateException {
+            DerValue[] sigItems = sigSequence.data.getSequence(3);
+            if (sigItems.length != 3) {
+                throw new IOException("Invalid number of signature items: " +
+                        "expected 3, got " + sigItems.length);
+            }
+
+            algId = AlgorithmId.parse(sigItems[0]);
+            signature = sigItems[1].getBitString();
+
+            if (sigItems[2].isContextSpecific((byte)0)) {
+                DerValue[] certDerItems = sigItems[2].data.getSequence(4);
+                int i = 0;
+                for (DerValue dv : certDerItems) {
+                    X509Certificate xc = new X509CertImpl(dv);
+                    certificates.add(xc);
+                }
+            } else {
+                throw new IOException("Invalid tag in signature block: " +
+                    sigItems[2].tag);
+            }
+        }
+
+        /**
+         * Parse the to-be-signed request data
+         *
+         * @param tbsReqSeq a {@code DerValue} object containing the to-be-
+         * signed OCSP request at the outermost SEQUENCE tag.
+         * @throws IOException if any parsing errors occur
+         */
+        private void parseTbsRequest(DerValue tbsReqSeq) throws IOException {
+            while (tbsReqSeq.data.available() > 0) {
+                DerValue dv = tbsReqSeq.data.getDerValue();
+                if (dv.isContextSpecific((byte)0)) {
+                    // The version was explicitly called out
+                    version = dv.data.getInteger();
+                } else if (dv.isContextSpecific((byte)1)) {
+                    // A GeneralName was provided
+                    requestorName = new GeneralName(dv.data.getDerValue());
+                } else if (dv.isContextSpecific((byte)2)) {
+                    // Parse the extensions
+                    DerValue[] extItems = dv.data.getSequence(2);
+                    extensions = parseExtensions(extItems);
+                } else if (dv.tag == DerValue.tag_Sequence) {
+                    while (dv.data.available() > 0) {
+                        requestList.add(new LocalSingleRequest(dv.data));
+                    }
+                }
+            }
+        }
+
+        /**
+         * Parse a SEQUENCE of extensions.  This routine is used both
+         * at the overall request level and down at the singleRequest layer.
+         *
+         * @param extDerItems an array of {@code DerValue} items, each one
+         * consisting of a DER-encoded extension.
+         *
+         * @return a {@code Map} of zero or more extensions,
+         * keyed by its object identifier in {@code String} form.
+         *
+         * @throws IOException if any parsing errors occur.
+         */
+        private Map<String, Extension> parseExtensions(DerValue[] extDerItems)
+                throws IOException {
+            Map<String, Extension> extMap = new HashMap<>();
+
+            if (extDerItems != null && extDerItems.length != 0) {
+                for (DerValue extDerVal : extDerItems) {
+                    sun.security.x509.Extension ext =
+                            new sun.security.x509.Extension(extDerVal);
+                    extMap.put(ext.getId(), ext);
+                }
+            }
+
+            return extMap;
+        }
+
+        /**
+         * Return the list of single request objects in this OCSP request.
+         *
+         * @return an unmodifiable {@code List} of zero or more requests.
+         */
+        private List<LocalSingleRequest> getRequests() {
+            return Collections.unmodifiableList(requestList);
+        }
+
+        /**
+         * Return the list of X.509 Certificates in this OCSP request.
+         *
+         * @return an unmodifiable {@code List} of zero or more
+         * {@cpde X509Certificate} objects.
+         */
+        private List<X509Certificate> getCertificates() {
+            return Collections.unmodifiableList(certificates);
+        }
+
+        /**
+         * Return the map of OCSP request extensions.
+         *
+         * @return an unmodifiable {@code Map} of zero or more
+         * {@code Extension} objects, keyed by their object identifiers
+         * in {@code String} form.
+         */
+        private Map<String, Extension> getExtensions() {
+            return Collections.unmodifiableMap(extensions);
+        }
+
+        /**
+         * Display the {@code LocalOcspRequest} in human readable form.
+         *
+         * @return a {@code String} representation of the
+         * {@code LocalOcspRequest}
+         */
+        @Override
+        public String toString() {
+            StringBuilder sb = new StringBuilder();
+
+            sb.append(String.format("OCSP Request: Version %d (0x%X)",
+                    version + 1, version)).append("\n");
+            if (requestorName != null) {
+                sb.append("Requestor Name: ").append(requestorName).
+                        append("\n");
+            }
+
+            int requestCtr = 0;
+            for (LocalSingleRequest lsr : requestList) {
+                sb.append("Request [").append(requestCtr++).append("]\n");
+                sb.append(lsr).append("\n");
+            }
+            if (!extensions.isEmpty()) {
+                sb.append("Extensions (").append(extensions.size()).
+                        append(")\n");
+                for (Extension ext : extensions.values()) {
+                    sb.append("\t").append(ext).append("\n");
+                }
+            }
+            if (signature != null) {
+                sb.append("Signature: ").append(algId).append("\n");
+                sb.append(dumpHexBytes(signature)).append("\n");
+                int certCtr = 0;
+                for (X509Certificate cert : certificates) {
+                    sb.append("Certificate [").append(certCtr++).append("]").
+                            append("\n");
+                    sb.append("\tSubject: ");
+                    sb.append(cert.getSubjectX500Principal()).append("\n");
+                    sb.append("\tIssuer: ");
+                    sb.append(cert.getIssuerX500Principal()).append("\n");
+                    sb.append("\tSerial: ").append(cert.getSerialNumber());
+                }
+            }
+
+            return sb.toString();
+        }
+
+        /**
+         * Inner class designed to handle the decoding/representation of
+         * single requests within a {@code LocalOcspRequest} object.
+         */
+        public class LocalSingleRequest {
+            private final CertId cid;
+            private Map<String, Extension> extensions = Collections.emptyMap();
+
+            private LocalSingleRequest(DerInputStream dis)
+                    throws IOException {
+                DerValue[] srItems = dis.getSequence(2);
+
+                // There should be 1, possibly 2 DerValue items
+                if (srItems.length == 1 || srItems.length == 2) {
+                    // The first parsable item should be the mandatory CertId
+                    cid = new CertId(srItems[0].data);
+                    if (srItems.length == 2) {
+                        if (srItems[1].isContextSpecific((byte)0)) {
+                            DerValue[] extDerItems = srItems[1].data.getSequence(2);
+                            extensions = parseExtensions(extDerItems);
+                        } else {
+                            throw new IOException("Illegal tag in Request " +
+                                    "extensions: " + srItems[1].tag);
+                        }
+                    }
+                } else {
+                    throw new IOException("Invalid number of items in " +
+                            "Request (" + srItems.length + ")");
+                }
+            }
+
+            /**
+             * Get the {@code CertId} for this single request.
+             *
+             * @return the {@code CertId} for this single request.
+             */
+            private CertId getCertId() {
+                return cid;
+            }
+
+            /**
+             * Return the map of single request extensions.
+             *
+             * @return an unmodifiable {@code Map} of zero or more
+             * {@code Extension} objects, keyed by their object identifiers
+             * in {@code String} form.
+             */
+            private Map<String, Extension> getExtensions() {
+                return Collections.unmodifiableMap(extensions);
+            }
+
+            /**
+             * Display the {@code LocalSingleRequest} in human readable form.
+             *
+             * @return a {@code String} representation of the
+             * {@code LocalSingleRequest}
+             */
+            @Override
+            public String toString() {
+                StringBuilder sb = new StringBuilder();
+                sb.append("CertId, Algorithm = ");
+                sb.append(cid.getHashAlgorithm()).append("\n");
+                sb.append("\tIssuer Name Hash: ");
+                sb.append(dumpHexBytes(cid.getIssuerNameHash(), 256, "", ""));
+                sb.append("\n");
+                sb.append("\tIssuer Key Hash: ");
+                sb.append(dumpHexBytes(cid.getIssuerKeyHash(), 256, "", ""));
+                sb.append("\n");
+                sb.append("\tSerial Number: ").append(cid.getSerialNumber());
+                if (!extensions.isEmpty()) {
+                    sb.append("Extensions (").append(extensions.size()).
+                            append(")\n");
+                    for (Extension ext : extensions.values()) {
+                        sb.append("\t").append(ext).append("\n");
+                    }
+                }
+
+                return sb.toString();
+            }
+        }
+    }
+
+    /**
+     * Simple nested class to handle OCSP requests without making
+     * changes to sun.security.provider.certpath.OCSPResponse
+     */
+    public class LocalOcspResponse {
+        private final int version = 0;
+        private final OCSPResponse.ResponseStatus responseStatus;
+        private final Map<CertId, CertStatusInfo> respItemMap;
+        private final Date producedAtDate;
+        private final List<LocalSingleResponse> singleResponseList =
+                new ArrayList<>();
+        private final Map<String, Extension> responseExtensions;
+        private byte[] signature;
+        private final List<X509Certificate> certificates;
+        private final byte[] encodedResponse;
+
+        /**
+         * Constructor for the generation of non-successful responses
+         *
+         * @param respStat the OCSP response status.
+         *
+         * @throws IOException if an error happens during encoding
+         * @throws NullPointerException if {@code respStat} is {@code null}
+         * or {@code respStat} is successful.
+         */
+        public LocalOcspResponse(OCSPResponse.ResponseStatus respStat)
+                throws IOException {
+            this(respStat, null, null);
+        }
+
+        /**
+         * Construct a response from a list of certificate
+         * status objects and extensions.
+         *
+         * @param respStat the status of the entire response
+         * @param itemMap a {@code Map} of {@code CertId} objects and their
+         * respective revocation statuses from the server's response DB.
+         * @param reqExtensions a {@code Map} of request extensions
+         *
+         * @throws IOException if an error happens during encoding
+         * @throws NullPointerException if {@code respStat} is {@code null}
+         * or {@code respStat} is successful, and a {@code null} {@code itemMap}
+         * has been provided.
+         */
+        public LocalOcspResponse(OCSPResponse.ResponseStatus respStat,
+                Map<CertId, CertStatusInfo> itemMap,
+                Map<String, Extension> reqExtensions) throws IOException {
+            responseStatus = Objects.requireNonNull(respStat,
+                    "Illegal null response status");
+            if (responseStatus == ResponseStatus.SUCCESSFUL) {
+                respItemMap = Objects.requireNonNull(itemMap,
+                        "SUCCESSFUL responses must have a response map");
+                producedAtDate = new Date();
+
+                // Turn the answerd from the response DB query into a list
+                // of single responses.
+                for (CertId id : itemMap.keySet()) {
+                    singleResponseList.add(
+                            new LocalSingleResponse(id, itemMap.get(id)));
+                }
+
+                responseExtensions = setResponseExtensions(reqExtensions);
+                certificates = new ArrayList<>();
+                if (signerCert != issuerCert) {
+                    certificates.add(signerCert);
+                }
+                certificates.add(issuerCert);
+            } else {
+                respItemMap = null;
+                producedAtDate = null;
+                responseExtensions = null;
+                certificates = null;
+            }
+            encodedResponse = this.getBytes();
+        }
+
+        /**
+         * Set the response extensions based on the request extensions
+         * that were received.  Right now, this is limited to the
+         * OCSP nonce extension.
+         *
+         * @param reqExts a {@code Map} of zero or more request extensions
+         *
+         * @return a {@code Map} of zero or more response extensions, keyed
+         * by the extension object identifier in {@code String} form.
+         */
+        private Map<String, Extension> setResponseExtensions(
+                Map<String, Extension> reqExts) {
+            Map<String, Extension> respExts = new HashMap<>();
+            String ocspNonceStr = PKIXExtensions.OCSPNonce_Id.toString();
+
+            if (reqExts != null) {
+                for (String id : reqExts.keySet()) {
+                    if (id.equals(ocspNonceStr)) {
+                        // We found a nonce, add it into the response extensions
+                        Extension ext = reqExts.get(id);
+                        if (ext != null) {
+                            respExts.put(id, ext);
+                            log("Added OCSP Nonce to response");
+                        } else {
+                            log("Error: Found nonce entry, but found null " +
+                                    "value.  Skipping");
+                        }
+                    }
+                }
+            }
+
+            return respExts;
+        }
+
+        /**
+         * Get the DER-encoded response bytes for this response
+         *
+         * @return a byte array containing the DER-encoded bytes for
+         * the response
+         *
+         * @throws IOException if any encoding errors occur
+         */
+        private byte[] getBytes() throws IOException {
+            DerOutputStream outerSeq = new DerOutputStream();
+            DerOutputStream responseStream = new DerOutputStream();
+            responseStream.putEnumerated(responseStatus.ordinal());
+            if (responseStatus == ResponseStatus.SUCCESSFUL &&
+                    respItemMap != null) {
+                encodeResponseBytes(responseStream);
+            }
+
+            // Commit the outermost sequence bytes
+            outerSeq.write(DerValue.tag_Sequence, responseStream);
+            return outerSeq.toByteArray();
+        }
+
+        private void encodeResponseBytes(DerOutputStream responseStream)
+                throws IOException {
+            DerOutputStream explicitZero = new DerOutputStream();
+            DerOutputStream respItemStream = new DerOutputStream();
+
+            respItemStream.putOID(OCSP_BASIC_RESPONSE_OID);
+
+            byte[] basicOcspBytes = encodeBasicOcspResponse();
+            respItemStream.putOctetString(basicOcspBytes);
+            explicitZero.write(DerValue.tag_Sequence, respItemStream);
+            responseStream.write(DerValue.createTag(DerValue.TAG_CONTEXT,
+                    true, (byte)0), explicitZero);
+        }
+
+        private byte[] encodeBasicOcspResponse() throws IOException {
+            DerOutputStream outerSeq = new DerOutputStream();
+            DerOutputStream basicORItemStream = new DerOutputStream();
+
+            // Encode the tbsResponse
+            byte[] tbsResponseBytes = encodeTbsResponse();
+            basicORItemStream.write(tbsResponseBytes);
+
+            try {
+                sigAlgId.derEncode(basicORItemStream);
+
+                // Create the signature
+                Signature sig = Signature.getInstance(sigAlgId.getName());
+                sig.initSign(signerKey);
+                sig.update(tbsResponseBytes);
+                signature = sig.sign();
+                basicORItemStream.putBitString(signature);
+            } catch (GeneralSecurityException exc) {
+                err(exc);
+                throw new IOException(exc);
+            }
+
+            // Add certificates
+            try {
+                DerOutputStream certStream = new DerOutputStream();
+                ArrayList<DerValue> certList = new ArrayList<>();
+                if (signerCert != issuerCert) {
+                    certList.add(new DerValue(signerCert.getEncoded()));
+                }
+                certList.add(new DerValue(issuerCert.getEncoded()));
+                DerValue[] dvals = new DerValue[certList.size()];
+                certStream.putSequence(certList.toArray(dvals));
+                basicORItemStream.write(DerValue.createTag(DerValue.TAG_CONTEXT,
+                        true, (byte)0), certStream);
+            } catch (CertificateEncodingException cex) {
+                err(cex);
+                throw new IOException(cex);
+            }
+
+            // Commit the outermost sequence bytes
+            outerSeq.write(DerValue.tag_Sequence, basicORItemStream);
+            return outerSeq.toByteArray();
+        }
+
+        private byte[] encodeTbsResponse() throws IOException {
+            DerOutputStream outerSeq = new DerOutputStream();
+            DerOutputStream tbsStream = new DerOutputStream();
+
+            // Note: We're not going explicitly assert the version
+            tbsStream.write(respId.getEncoded());
+            tbsStream.putGeneralizedTime(producedAtDate);
+
+            // Sequence of responses
+            encodeSingleResponses(tbsStream);
+
+            // TODO: add response extension support
+            encodeExtensions(tbsStream);
+
+            outerSeq.write(DerValue.tag_Sequence, tbsStream);
+            return outerSeq.toByteArray();
+        }
+
+        private void encodeSingleResponses(DerOutputStream tbsStream)
+                throws IOException {
+            DerValue[] srDerVals = new DerValue[singleResponseList.size()];
+            int srDvCtr = 0;
+
+            for (LocalSingleResponse lsr : singleResponseList) {
+                srDerVals[srDvCtr++] = new DerValue(lsr.getBytes());
+            }
+
+            tbsStream.putSequence(srDerVals);
+        }
+
+        private void encodeExtensions(DerOutputStream tbsStream)
+                throws IOException {
+            DerOutputStream extSequence = new DerOutputStream();
+            DerOutputStream extItems = new DerOutputStream();
+
+            for (Extension ext : responseExtensions.values()) {
+                ext.encode(extItems);
+            }
+            extSequence.write(DerValue.tag_Sequence, extItems);
+            tbsStream.write(DerValue.createTag(DerValue.TAG_CONTEXT, true,
+                    (byte)1), extSequence);
+        }
+
+        @Override
+        public String toString() {
+            StringBuilder sb = new StringBuilder();
+
+            sb.append("OCSP Response: ").append(responseStatus).append("\n");
+            if (responseStatus == ResponseStatus.SUCCESSFUL) {
+                sb.append("Response Type: ").
+                        append(OCSP_BASIC_RESPONSE_OID.toString()).append("\n");
+                sb.append(String.format("Version: %d (0x%X)", version + 1,
+                        version)).append("\n");
+                sb.append("Responder Id: ").append(respId.toString()).
+                        append("\n");
+                sb.append("Produced At: ").
+                        append(utcDateFmt.format(producedAtDate)).append("\n");
+
+                int srCtr = 0;
+                for (LocalSingleResponse lsr : singleResponseList) {
+                    sb.append("SingleResponse [").append(srCtr++).append("]\n");
+                    sb.append(lsr);
+                }
+
+                if (!responseExtensions.isEmpty()) {
+                    sb.append("Extensions (").append(responseExtensions.size()).
+                            append(")\n");
+                    for (Extension ext : responseExtensions.values()) {
+                        sb.append("\t").append(ext).append("\n");
+                    }
+                } else {
+                    sb.append("\n");
+                }
+
+                if (signature != null) {
+                    sb.append("Signature: ").append(sigAlgId).append("\n");
+                    sb.append(dumpHexBytes(signature)).append("\n");
+                    int certCtr = 0;
+                    for (X509Certificate cert : certificates) {
+                        sb.append("Certificate [").append(certCtr++).append("]").
+                                append("\n");
+                        sb.append("\tSubject: ");
+                        sb.append(cert.getSubjectX500Principal()).append("\n");
+                        sb.append("\tIssuer: ");
+                        sb.append(cert.getIssuerX500Principal()).append("\n");
+                        sb.append("\tSerial: ").append(cert.getSerialNumber());
+                        sb.append("\n");
+                    }
+                }
+            }
+
+            return sb.toString();
+        }
+
+        private class LocalSingleResponse {
+            private final CertId certId;
+            private final CertStatusInfo csInfo;
+            private final Date thisUpdate;
+            private final Date lsrNextUpdate;
+            private final Map<String, Extension> singleExtensions;
+
+            public LocalSingleResponse(CertId cid, CertStatusInfo info) {
+                certId = Objects.requireNonNull(cid, "CertId must be non-null");
+                csInfo = Objects.requireNonNull(info,
+                        "CertStatusInfo must be non-null");
+
+                // For now, we'll keep things simple and make the thisUpdate
+                // field the same as the producedAt date.
+                thisUpdate = producedAtDate;
+                lsrNextUpdate = getNextUpdate();
+
+                // TODO Add extensions support
+                singleExtensions = Collections.emptyMap();
+            }
+
+            @Override
+            public String toString() {
+                StringBuilder sb = new StringBuilder();
+                sb.append("Certificate Status: ").append(csInfo.getType());
+                sb.append("\n");
+                if (csInfo.getType() == CertStatus.CERT_STATUS_REVOKED) {
+                    sb.append("Revocation Time: ");
+                    sb.append(utcDateFmt.format(csInfo.getRevocationTime()));
+                    sb.append("\n");
+                    if (csInfo.getRevocationReason() != null) {
+                        sb.append("Revocation Reason: ");
+                        sb.append(csInfo.getRevocationReason()).append("\n");
+                    }
+                }
+
+                sb.append("CertId, Algorithm = ");
+                sb.append(certId.getHashAlgorithm()).append("\n");
+                sb.append("\tIssuer Name Hash: ");
+                sb.append(dumpHexBytes(certId.getIssuerNameHash(), 256, "", ""));
+                sb.append("\n");
+                sb.append("\tIssuer Key Hash: ");
+                sb.append(dumpHexBytes(certId.getIssuerKeyHash(), 256, "", ""));
+                sb.append("\n");
+                sb.append("\tSerial Number: ").append(certId.getSerialNumber());
+                sb.append("\n");
+                sb.append("This Update: ");
+                sb.append(utcDateFmt.format(thisUpdate)).append("\n");
+                if (lsrNextUpdate != null) {
+                    sb.append("Next Update: ");
+                    sb.append(utcDateFmt.format(lsrNextUpdate)).append("\n");
+                }
+
+                if (!singleExtensions.isEmpty()) {
+                    sb.append("Extensions (").append(singleExtensions.size()).
+                            append(")\n");
+                    for (Extension ext : singleExtensions.values()) {
+                        sb.append("\t").append(ext).append("\n");
+                    }
+                }
+
+                return sb.toString();
+            }
+
+            public byte[] getBytes() throws IOException {
+                byte[] nullData = { };
+                DerOutputStream responseSeq = new DerOutputStream();
+                DerOutputStream srStream = new DerOutputStream();
+
+                // Encode the CertId
+                certId.encode(srStream);
+
+                // Next, encode the CertStatus field
+                CertStatus csiType = csInfo.getType();
+                switch (csiType) {
+                    case CERT_STATUS_GOOD:
+                        srStream.write(DerValue.createTag(DerValue.TAG_CONTEXT,
+                                false, (byte)0), nullData);
+                        break;
+                    case CERT_STATUS_REVOKED:
+                        DerOutputStream revInfo = new DerOutputStream();
+                        revInfo.putGeneralizedTime(csInfo.getRevocationTime());
+                        CRLReason revReason = csInfo.getRevocationReason();
+                        if (revReason != null) {
+                            byte[] revDer = new byte[3];
+                            revDer[0] = DerValue.tag_Enumerated;
+                            revDer[1] = 1;
+                            revDer[2] = (byte)revReason.ordinal();
+                            revInfo.write(DerValue.createTag(
+                                    DerValue.TAG_CONTEXT, true, (byte)0),
+                                    revDer);
+                        }
+                        srStream.write(DerValue.createTag(
+                                DerValue.TAG_CONTEXT, true, (byte)1),
+                                revInfo);
+                        break;
+                    case CERT_STATUS_UNKNOWN:
+                        srStream.write(DerValue.createTag(DerValue.TAG_CONTEXT,
+                                false, (byte)2), nullData);
+                        break;
+                    default:
+                        throw new IOException("Unknown CertStatus: " + csiType);
+                }
+
+                // Add the necessary dates
+                srStream.putGeneralizedTime(thisUpdate);
+                if (lsrNextUpdate != null) {
+                    DerOutputStream nuStream = new DerOutputStream();
+                    nuStream.putGeneralizedTime(lsrNextUpdate);
+                    srStream.write(DerValue.createTag(DerValue.TAG_CONTEXT,
+                            true, (byte)0), nuStream);
+                }
+
+                // TODO add singleResponse Extension support
+
+                // Add the single response to the response output stream
+                responseSeq.write(DerValue.tag_Sequence, srStream);
+                return responseSeq.toByteArray();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/text/Format/NumberFormat/Bug8132125.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8132125
+ * @summary Checks Swiss' number elements
+ */
+
+import java.text.*;
+import java.util.*;
+
+public class Bug8132125 {
+    public static void main(String[] args) {
+        Locale deCH = new Locale("de", "CH");
+        NumberFormat nf = NumberFormat.getInstance(deCH);
+
+        String expected = "54'839'483.142"; // i.e. "." as decimal separator, "'" as grouping separator
+        String actual = nf.format(54839483.1415);
+        if (!actual.equals(expected)) {
+            throw new RuntimeException("correct for de_CH: " + expected + " vs. actual " + actual);
+        }
+    }
+}
--- a/jdk/test/java/time/tck/java/time/TCKInstant.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/java/time/tck/java/time/TCKInstant.java	Mon Aug 10 14:05:37 2015 +0300
@@ -112,6 +112,8 @@
 
 /**
  * Test Instant.
+ *
+ * @bug 8133022
  */
 @Test
 public class TCKInstant extends AbstractDateTimeTest {
@@ -1928,6 +1930,16 @@
         Instant.ofEpochSecond(Long.MIN_VALUE / 1000 - 1).toEpochMilli();
     }
 
+    @Test(expectedExceptions=ArithmeticException.class)
+    public void test_toEpochMillis_overflow() {
+        Instant.ofEpochSecond(Long.MAX_VALUE / 1000, 809_000_000).toEpochMilli();
+    }
+
+    @Test(expectedExceptions=ArithmeticException.class)
+    public void test_toEpochMillis_overflow2() {
+        Instant.ofEpochSecond(-9223372036854776L, 1).toEpochMilli();
+    }
+
     //-----------------------------------------------------------------------
     // compareTo()
     //-----------------------------------------------------------------------
--- a/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java	Mon Aug 10 14:05:37 2015 +0300
@@ -146,7 +146,7 @@
             {"Asia/Macau",       "China Standard Time",   preferred, Locale.ENGLISH, TextStyle.FULL},
             {"Asia/Taipei",      "Taipei Standard Time",  preferred, Locale.ENGLISH, TextStyle.FULL},
             {"America/Chicago",  "CST",                   none,      Locale.ENGLISH, TextStyle.SHORT},
-            {"Asia/Taipei",      "TST",                   preferred, Locale.ENGLISH, TextStyle.SHORT},
+            {"Asia/Taipei",      "CST",                   preferred, Locale.ENGLISH, TextStyle.SHORT},
             {"Australia/South",  "ACST",                  preferred_s, Locale.ENGLISH, TextStyle.SHORT},
             {"America/Chicago",  "CDT",                   none,        Locale.ENGLISH, TextStyle.SHORT},
             {"Asia/Shanghai",    "CDT",                   preferred_s, Locale.ENGLISH, TextStyle.SHORT},
--- a/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,12 +23,13 @@
 
 /*
  * @test
- * @bug 8005471 8008577
+ * @bug 8005471 8008577 8129881 8130845
  * @run main/othervm -Djava.locale.providers=CLDR CLDRDisplayNamesTest
  * @summary Make sure that localized time zone names of CLDR are used
  * if specified.
  */
 
+import java.text.*;
 import java.util.*;
 import static java.util.TimeZone.*;
 
@@ -72,6 +73,8 @@
     };
 
     public static void main(String[] args) {
+        // Make sure that localized time zone names of CLDR are used
+        // if specified.
         TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");
         int errors = 0;
         for (String[] data : CLDR_DATA) {
@@ -87,6 +90,35 @@
                 }
             }
         }
+
+        // for 8129881
+        tz = TimeZone.getTimeZone("Europe/Vienna");
+        String name = tz.getDisplayName(false, SHORT);
+        if (!"CET".equals(name)) {
+            System.err.printf("error: got '%s' expected 'CET' %n", name);
+            errors++;
+        }
+
+        // for 8130845
+        SimpleDateFormat fmtROOT = new SimpleDateFormat("EEE MMM d hh:mm:ss z yyyy", Locale.ROOT);
+        SimpleDateFormat fmtUS = new SimpleDateFormat("EEE MMM d hh:mm:ss z yyyy", Locale.US);
+        SimpleDateFormat fmtUK = new SimpleDateFormat("EEE MMM d hh:mm:ss z yyyy", Locale.UK);
+        Locale originalLocale = Locale.getDefault();
+        try {
+            Locale.setDefault(Locale.ROOT);
+            fmtROOT.parse("Thu Nov 13 04:35:51 AKST 2008");
+            fmtUS.parse("Thu Nov 13 04:35:51 AKST 2008");
+            fmtUK.parse("Thu Nov 13 04:35:51 GMT-09:00 2008");
+            String dateString = new Date().toString();
+            System.out.println("Date: "+dateString);
+            System.out.println("Parsed Date: "+new Date(Date.parse(dateString)).toString());
+        } catch (ParseException pe) {
+            System.err.println(pe);
+            errors++;
+        } finally {
+            Locale.setDefault(originalLocale);
+        }
+
         if (errors > 0) {
             throw new RuntimeException("test failed");
         }
--- a/jdk/test/java/util/logging/LoggingDeadlock2.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/java/util/logging/LoggingDeadlock2.java	Mon Aug 10 14:05:37 2015 +0300
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     6467152 6716076 6829503
+ * @bug     6467152 6716076 6829503 8132550
  * @summary deadlock occurs in LogManager initialization and JVM termination
  * @author  Serguei Spitsyn / Hitachi / Martin Buchholz
  *
--- a/jdk/test/javax/net/ssl/DTLS/NoMacInitialClientHello.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/javax/net/ssl/DTLS/NoMacInitialClientHello.java	Mon Aug 10 14:05:37 2015 +0300
@@ -29,7 +29,8 @@
  * @bug 8043758
  * @summary Datagram Transport Layer Security (DTLS)
  * @compile DTLSOverDatagram.java
- * @run main/othervm NoMacInitialClientHello
+ * @run main/othervm -Djdk.tls.client.enableStatusRequestExtension=false
+ *      NoMacInitialClientHello
  */
 
 import java.net.DatagramPacket;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/Stapling/HttpsUrlConnClient.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,797 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary OCSP Stapling for TLS
+ * @library ../../../../java/security/testlibrary
+ * @build CertificateBuilder SimpleOCSPServer
+ * @run main/othervm HttpsUrlConnClient
+ */
+
+import java.io.*;
+import java.math.BigInteger;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.net.Socket;
+import java.net.URL;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import javax.net.ssl.*;
+import java.security.KeyStore;
+import java.security.PublicKey;
+import java.security.Security;
+import java.security.GeneralSecurityException;
+import java.security.cert.CertPathValidatorException;
+import java.security.cert.CertPathValidatorException.BasicReason;
+import java.security.cert.Certificate;
+import java.security.cert.PKIXBuilderParameters;
+import java.security.cert.X509CertSelector;
+import java.security.cert.X509Certificate;
+import java.security.cert.PKIXRevocationChecker;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+import sun.security.testlibrary.SimpleOCSPServer;
+import sun.security.testlibrary.CertificateBuilder;
+import sun.security.validator.ValidatorException;
+
+public class HttpsUrlConnClient {
+
+    /*
+     * =============================================================
+     * Set the various variables needed for the tests, then
+     * specify what tests to run on each side.
+     */
+
+    static final byte[] LINESEP = { 10 };
+    static final Base64.Encoder B64E = Base64.getMimeEncoder(64, LINESEP);
+
+    // Turn on TLS debugging
+    static boolean debug = true;
+
+    /*
+     * Should we run the client or server in a separate thread?
+     * Both sides can throw exceptions, but do you have a preference
+     * as to which side should be the main thread.
+     */
+    static boolean separateServerThread = true;
+    Thread clientThread = null;
+    Thread serverThread = null;
+
+    static String passwd = "passphrase";
+    static String ROOT_ALIAS = "root";
+    static String INT_ALIAS = "intermediate";
+    static String SSL_ALIAS = "ssl";
+
+    /*
+     * Is the server ready to serve?
+     */
+    volatile static boolean serverReady = false;
+    volatile int serverPort = 0;
+
+    volatile Exception serverException = null;
+    volatile Exception clientException = null;
+
+    // PKI components we will need for this test
+    static KeyStore rootKeystore;           // Root CA Keystore
+    static KeyStore intKeystore;            // Intermediate CA Keystore
+    static KeyStore serverKeystore;         // SSL Server Keystore
+    static KeyStore trustStore;             // SSL Client trust store
+    static SimpleOCSPServer rootOcsp;       // Root CA OCSP Responder
+    static int rootOcspPort;                // Port number for root OCSP
+    static SimpleOCSPServer intOcsp;        // Intermediate CA OCSP Responder
+    static int intOcspPort;                 // Port number for intermed. OCSP
+
+    private static final String SIMPLE_WEB_PAGE = "<HTML>\n" +
+            "<HEAD><Title>Web Page!</Title></HEAD>\n" +
+            "<BODY><H1>Web Page!</H1></BODY>\n</HTML>";
+    private static final SimpleDateFormat utcDateFmt =
+            new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss z");
+    /*
+     * If the client or server is doing some kind of object creation
+     * that the other side depends on, and that thread prematurely
+     * exits, you may experience a hang.  The test harness will
+     * terminate all hung threads after its timeout has expired,
+     * currently 3 minutes by default, but you might try to be
+     * smart about it....
+     */
+    public static void main(String[] args) throws Exception {
+        if (debug) {
+            System.setProperty("javax.net.debug", "ssl");
+        }
+
+        System.setProperty("javax.net.ssl.keyStore", "");
+        System.setProperty("javax.net.ssl.keyStorePassword", "");
+        System.setProperty("javax.net.ssl.trustStore", "");
+        System.setProperty("javax.net.ssl.trustStorePassword", "");
+
+        // Create the PKI we will use for the test and start the OCSP servers
+        createPKI();
+        utcDateFmt.setTimeZone(TimeZone.getTimeZone("GMT"));
+
+        testPKIXParametersRevEnabled();
+
+        // shut down the OCSP responders before finishing the test
+        intOcsp.stop();
+        rootOcsp.stop();
+    }
+
+    /**
+     * Do a basic connection using PKIXParameters with revocation checking
+     * enabled and client-side OCSP disabled.  It will only pass if all
+     * stapled responses are present, valid and have a GOOD status.
+     */
+    static void testPKIXParametersRevEnabled() throws Exception {
+        ClientParameters cliParams = new ClientParameters();
+        ServerParameters servParams = new ServerParameters();
+        serverReady = false;
+
+        System.out.println("=====================================");
+        System.out.println("Stapling enabled, PKIXParameters with");
+        System.out.println("Revocation checking enabled ");
+        System.out.println("=====================================");
+
+        // Set the certificate entry in the intermediate OCSP responder
+        // with a revocation date of 8 hours ago.
+        X509Certificate sslCert =
+                (X509Certificate)serverKeystore.getCertificate(SSL_ALIAS);
+        Map<BigInteger, SimpleOCSPServer.CertStatusInfo> revInfo =
+            new HashMap<>();
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_REVOKED,
+                        new Date(System.currentTimeMillis() -
+                                TimeUnit.HOURS.toMillis(8))));
+        intOcsp.updateStatusDb(revInfo);
+
+        // Set up revocation checking on the client with no client-side
+        // OCSP fall-back
+        cliParams.pkixParams = new PKIXBuilderParameters(trustStore,
+                new X509CertSelector());
+        cliParams.pkixParams.setRevocationEnabled(true);
+        Security.setProperty("ocsp.enable", "false");
+
+        HttpsUrlConnClient sslTest = new HttpsUrlConnClient(cliParams,
+                servParams);
+        TestResult tr = sslTest.getResult();
+        if (!checkClientValidationFailure(tr.clientExc, BasicReason.REVOKED)) {
+            if (tr.clientExc != null) {
+                throw tr.clientExc;
+            } else {
+                throw new RuntimeException(
+                        "Expected client failure, but the client succeeded");
+            }
+        }
+
+        // In this case the server should also have thrown an exception
+        // because of the client alert
+        if (tr.serverExc instanceof SSLHandshakeException) {
+            if (!tr.serverExc.getMessage().contains(
+                    "alert: bad_certificate_status_response")) {
+                throw tr.serverExc;
+            }
+        }
+
+        System.out.println("                PASS");
+        System.out.println("=====================================\n");
+    }
+
+    /*
+     * Define the server side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doServerSide(ServerParameters servParams) throws Exception {
+
+        // Selectively enable or disable the feature
+        System.setProperty("jdk.tls.server.enableStatusRequestExtension",
+                Boolean.toString(servParams.enabled));
+
+        // Set all the other operating parameters
+        System.setProperty("jdk.tls.stapling.cacheSize",
+                Integer.toString(servParams.cacheSize));
+        System.setProperty("jdk.tls.stapling.cacheLifetime",
+                Integer.toString(servParams.cacheLifetime));
+        System.setProperty("jdk.tls.stapling.responseTimeout",
+                Integer.toString(servParams.respTimeout));
+        System.setProperty("jdk.tls.stapling.responderURI", servParams.respUri);
+        System.setProperty("jdk.tls.stapling.responderOverride",
+                Boolean.toString(servParams.respOverride));
+        System.setProperty("jdk.tls.stapling.ignoreExtensions",
+                Boolean.toString(servParams.ignoreExts));
+
+        // Set keystores and trust stores for the server
+        KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+        kmf.init(serverKeystore, passwd.toCharArray());
+        TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
+        tmf.init(trustStore);
+
+        SSLContext sslc = SSLContext.getInstance("TLS");
+        sslc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+
+        SSLServerSocketFactory sslssf = sslc.getServerSocketFactory();
+        SSLServerSocket sslServerSocket =
+            (SSLServerSocket) sslssf.createServerSocket(serverPort);
+
+        serverPort = sslServerSocket.getLocalPort();
+        log("Server Port is " + serverPort);
+
+        // Dump the private key in PKCS8 format, not encrypted.  This
+        // key dump can be used if the traffic was captured using tcpdump
+        // or wireshark to look into the encrypted packets for debug purposes.
+        if (debug) {
+            byte[] keybytes = serverKeystore.getKey(SSL_ALIAS,
+                    passwd.toCharArray()).getEncoded();
+            PKCS8EncodedKeySpec p8spec = new PKCS8EncodedKeySpec(keybytes);
+            StringBuilder keyPem = new StringBuilder();
+            keyPem.append("-----BEGIN PRIVATE KEY-----\n");
+            keyPem.append(B64E.encodeToString(p8spec.getEncoded())).append("\n");
+            keyPem.append("-----END PRIVATE KEY-----\n");
+            log("Private key is:\n" + keyPem.toString());
+        }
+
+        /*
+         * Signal Client, we're ready for his connect.
+         */
+        serverReady = true;
+
+        try (SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
+                BufferedReader in = new BufferedReader(
+                    new InputStreamReader(sslSocket.getInputStream()));
+                OutputStream out = sslSocket.getOutputStream()) {
+            StringBuilder hdrBldr = new StringBuilder();
+            String line;
+            while ((line = in.readLine()) != null && !line.isEmpty()) {
+                hdrBldr.append(line).append("\n");
+            }
+            String headerText = hdrBldr.toString();
+            log("Header Received: " + headerText.length() + " bytes\n" +
+                    headerText);
+
+            StringBuilder sb = new StringBuilder();
+            sb.append("HTTP/1.0 200 OK\r\n");
+            sb.append("Date: ").append(utcDateFmt.format(new Date())).
+                    append("\r\n");
+            sb.append("Content-Type: text/html\r\n");
+            sb.append("Content-Length: ").append(SIMPLE_WEB_PAGE.length());
+            sb.append("\r\n\r\n");
+            out.write(sb.toString().getBytes("UTF-8"));
+            out.write(SIMPLE_WEB_PAGE.getBytes("UTF-8"));
+            out.flush();
+            log("Server replied with:\n" + sb.toString() + SIMPLE_WEB_PAGE);
+        }
+    }
+
+    /*
+     * Define the client side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doClientSide(ClientParameters cliParams) throws Exception {
+
+        /*
+         * Wait for server to get started.
+         */
+        while (!serverReady) {
+            Thread.sleep(50);
+        }
+
+        // Selectively enable or disable the feature
+        System.setProperty("jdk.tls.client.enableStatusRequestExtension",
+                Boolean.toString(cliParams.enabled));
+
+        HtucSSLSocketFactory sockFac = new HtucSSLSocketFactory(cliParams);
+        HttpsURLConnection.setDefaultSSLSocketFactory(sockFac);
+        URL location = new URL("https://localhost:" + serverPort);
+        HttpsURLConnection tlsConn =
+                (HttpsURLConnection)location.openConnection();
+        tlsConn.setConnectTimeout(5000);
+        tlsConn.setReadTimeout(5000);
+        tlsConn.setDoInput(true);
+
+        try (InputStream in = tlsConn.getInputStream()) {
+            // Check the response
+            if (debug && tlsConn.getResponseCode() !=
+                    HttpURLConnection.HTTP_OK) {
+                log("Received HTTP error: " + tlsConn.getResponseCode() +
+                        " - " + tlsConn.getResponseMessage());
+                throw new IOException("HTTP error: " +
+                        tlsConn.getResponseCode());
+            }
+
+            int contentLength = tlsConn.getContentLength();
+            if (contentLength == -1) {
+                contentLength = Integer.MAX_VALUE;
+            }
+            byte[] response = new byte[contentLength > 2048 ? 2048 : contentLength];
+            int total = 0;
+            while (total < contentLength) {
+                int count = in.read(response, total, response.length - total);
+                if (count < 0)
+                    break;
+
+                total += count;
+                log("Read " + count + " bytes (" + total + " total)");
+                if (total >= response.length && total < contentLength) {
+                    response = Arrays.copyOf(response, total * 2);
+                }
+            }
+            response = Arrays.copyOf(response, total);
+            String webPage = new String(response, 0, total);
+            if (debug) {
+                log("Web page:\n" + webPage);
+            }
+        }
+    }
+
+    /*
+     * Primary constructor, used to drive remainder of the test.
+     *
+     * Fork off the other side, then do your work.
+     */
+    HttpsUrlConnClient(ClientParameters cliParams,
+            ServerParameters servParams) throws Exception {
+        Exception startException = null;
+        try {
+            if (separateServerThread) {
+                startServer(servParams, true);
+                startClient(cliParams, false);
+            } else {
+                startClient(cliParams, true);
+                startServer(servParams, false);
+            }
+        } catch (Exception e) {
+            startException = e;
+        }
+
+        /*
+         * Wait for other side to close down.
+         */
+        if (separateServerThread) {
+            if (serverThread != null) {
+                serverThread.join();
+            }
+        } else {
+            if (clientThread != null) {
+                clientThread.join();
+            }
+        }
+    }
+
+    /**
+     * Checks a validation failure to see if it failed for the reason we think
+     * it should.  This comes in as an SSLException of some sort, but it
+     * encapsulates a ValidatorException which in turn encapsulates the
+     * CertPathValidatorException we are interested in.
+     *
+     * @param e the exception thrown at the top level
+     * @param reason the underlying CertPathValidatorException BasicReason
+     * we are expecting it to have.
+     *
+     * @return true if the reason matches up, false otherwise.
+     */
+    static boolean checkClientValidationFailure(Exception e,
+            BasicReason reason) {
+        boolean result = false;
+
+        if (e instanceof SSLException) {
+            Throwable valExc = e.getCause();
+            if (valExc instanceof sun.security.validator.ValidatorException) {
+                Throwable cause = valExc.getCause();
+                if (cause instanceof CertPathValidatorException) {
+                    CertPathValidatorException cpve =
+                            (CertPathValidatorException)cause;
+                    if (cpve.getReason() == reason) {
+                        result = true;
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
+    TestResult getResult() {
+        TestResult tr = new TestResult();
+        tr.clientExc = clientException;
+        tr.serverExc = serverException;
+        return tr;
+    }
+
+    final void startServer(ServerParameters servParams, boolean newThread)
+            throws Exception {
+        if (newThread) {
+            serverThread = new Thread() {
+                @Override
+                public void run() {
+                    try {
+                        doServerSide(servParams);
+                    } catch (Exception e) {
+                        /*
+                         * Our server thread just died.
+                         *
+                         * Release the client, if not active already...
+                         */
+                        System.err.println("Server died...");
+                        serverReady = true;
+                        serverException = e;
+                    }
+                }
+            };
+            serverThread.start();
+        } else {
+            try {
+                doServerSide(servParams);
+            } catch (Exception e) {
+                serverException = e;
+            } finally {
+                serverReady = true;
+            }
+        }
+    }
+
+    final void startClient(ClientParameters cliParams, boolean newThread)
+            throws Exception {
+        if (newThread) {
+            clientThread = new Thread() {
+                @Override
+                public void run() {
+                    try {
+                        doClientSide(cliParams);
+                    } catch (Exception e) {
+                        /*
+                         * Our client thread just died.
+                         */
+                        System.err.println("Client died...");
+                        clientException = e;
+                    }
+                }
+            };
+            clientThread.start();
+        } else {
+            try {
+                doClientSide(cliParams);
+            } catch (Exception e) {
+                clientException = e;
+            }
+        }
+    }
+
+    /**
+     * Creates the PKI components necessary for this test, including
+     * Root CA, Intermediate CA and SSL server certificates, the keystores
+     * for each entity, a client trust store, and starts the OCSP responders.
+     */
+    private static void createPKI() throws Exception {
+        CertificateBuilder cbld = new CertificateBuilder();
+        KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
+        keyGen.initialize(2048);
+        KeyStore.Builder keyStoreBuilder =
+                KeyStore.Builder.newInstance("PKCS12", null,
+                        new KeyStore.PasswordProtection(passwd.toCharArray()));
+
+        // Generate Root, IntCA, EE keys
+        KeyPair rootCaKP = keyGen.genKeyPair();
+        log("Generated Root CA KeyPair");
+        KeyPair intCaKP = keyGen.genKeyPair();
+        log("Generated Intermediate CA KeyPair");
+        KeyPair sslKP = keyGen.genKeyPair();
+        log("Generated SSL Cert KeyPair");
+
+        // Set up the Root CA Cert
+        cbld.setSubjectName("CN=Root CA Cert, O=SomeCompany");
+        cbld.setPublicKey(rootCaKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("1"));
+        // Make a 3 year validity starting from 60 days ago
+        long start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(60);
+        long end = start + TimeUnit.DAYS.toMillis(1085);
+        cbld.setValidity(new Date(start), new Date(end));
+        addCommonExts(cbld, rootCaKP.getPublic(), rootCaKP.getPublic());
+        addCommonCAExts(cbld);
+        // Make our Root CA Cert!
+        X509Certificate rootCert = cbld.build(null, rootCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("Root CA Created:\n" + certInfo(rootCert));
+
+        // Now build a keystore and add the keys and cert
+        rootKeystore = keyStoreBuilder.getKeyStore();
+        Certificate[] rootChain = {rootCert};
+        rootKeystore.setKeyEntry(ROOT_ALIAS, rootCaKP.getPrivate(),
+                passwd.toCharArray(), rootChain);
+
+        // Now fire up the OCSP responder
+        rootOcsp = new SimpleOCSPServer(rootKeystore, passwd, ROOT_ALIAS, null);
+        rootOcsp.enableLog(debug);
+        rootOcsp.setNextUpdateInterval(3600);
+        rootOcsp.start();
+        Thread.sleep(1000);         // Give the server a second to start up
+        rootOcspPort = rootOcsp.getPort();
+        String rootRespURI = "http://localhost:" + rootOcspPort;
+        log("Root OCSP Responder URI is " + rootRespURI);
+
+        // Now that we have the root keystore and OCSP responder we can
+        // create our intermediate CA.
+        cbld.reset();
+        cbld.setSubjectName("CN=Intermediate CA Cert, O=SomeCompany");
+        cbld.setPublicKey(intCaKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("100"));
+        // Make a 2 year validity starting from 30 days ago
+        start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(30);
+        end = start + TimeUnit.DAYS.toMillis(730);
+        cbld.setValidity(new Date(start), new Date(end));
+        addCommonExts(cbld, intCaKP.getPublic(), rootCaKP.getPublic());
+        addCommonCAExts(cbld);
+        cbld.addAIAExt(Collections.singletonList(rootRespURI));
+        // Make our Intermediate CA Cert!
+        X509Certificate intCaCert = cbld.build(rootCert, rootCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("Intermediate CA Created:\n" + certInfo(intCaCert));
+
+        // Provide intermediate CA cert revocation info to the Root CA
+        // OCSP responder.
+        Map<BigInteger, SimpleOCSPServer.CertStatusInfo> revInfo =
+            new HashMap<>();
+        revInfo.put(intCaCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        rootOcsp.updateStatusDb(revInfo);
+
+        // Now build a keystore and add the keys, chain and root cert as a TA
+        intKeystore = keyStoreBuilder.getKeyStore();
+        Certificate[] intChain = {intCaCert, rootCert};
+        intKeystore.setKeyEntry(INT_ALIAS, intCaKP.getPrivate(),
+                passwd.toCharArray(), intChain);
+        intKeystore.setCertificateEntry(ROOT_ALIAS, rootCert);
+
+        // Now fire up the Intermediate CA OCSP responder
+        intOcsp = new SimpleOCSPServer(intKeystore, passwd,
+                INT_ALIAS, null);
+        intOcsp.enableLog(debug);
+        intOcsp.setNextUpdateInterval(3600);
+        intOcsp.start();
+        Thread.sleep(1000);
+        intOcspPort = intOcsp.getPort();
+        String intCaRespURI = "http://localhost:" + intOcspPort;
+        log("Intermediate CA OCSP Responder URI is " + intCaRespURI);
+
+        // Last but not least, let's make our SSLCert and add it to its own
+        // Keystore
+        cbld.reset();
+        cbld.setSubjectName("CN=SSLCertificate, O=SomeCompany");
+        cbld.setPublicKey(sslKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("4096"));
+        // Make a 1 year validity starting from 7 days ago
+        start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(7);
+        end = start + TimeUnit.DAYS.toMillis(365);
+        cbld.setValidity(new Date(start), new Date(end));
+
+        // Add extensions
+        addCommonExts(cbld, sslKP.getPublic(), intCaKP.getPublic());
+        boolean[] kuBits = {true, false, true, false, false, false,
+            false, false, false};
+        cbld.addKeyUsageExt(kuBits);
+        List<String> ekuOids = new ArrayList<>();
+        ekuOids.add("1.3.6.1.5.5.7.3.1");
+        ekuOids.add("1.3.6.1.5.5.7.3.2");
+        cbld.addExtendedKeyUsageExt(ekuOids);
+        cbld.addSubjectAltNameDNSExt(Collections.singletonList("localhost"));
+        cbld.addAIAExt(Collections.singletonList(intCaRespURI));
+        // Make our SSL Server Cert!
+        X509Certificate sslCert = cbld.build(intCaCert, intCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("SSL Certificate Created:\n" + certInfo(sslCert));
+
+        // Provide SSL server cert revocation info to the Intermeidate CA
+        // OCSP responder.
+        revInfo = new HashMap<>();
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        intOcsp.updateStatusDb(revInfo);
+
+        // Now build a keystore and add the keys, chain and root cert as a TA
+        serverKeystore = keyStoreBuilder.getKeyStore();
+        Certificate[] sslChain = {sslCert, intCaCert, rootCert};
+        serverKeystore.setKeyEntry(SSL_ALIAS, sslKP.getPrivate(),
+                passwd.toCharArray(), sslChain);
+        serverKeystore.setCertificateEntry(ROOT_ALIAS, rootCert);
+
+        // And finally a Trust Store for the client
+        trustStore = keyStoreBuilder.getKeyStore();
+        trustStore.setCertificateEntry(ROOT_ALIAS, rootCert);
+    }
+
+    private static void addCommonExts(CertificateBuilder cbld,
+            PublicKey subjKey, PublicKey authKey) throws IOException {
+        cbld.addSubjectKeyIdExt(subjKey);
+        cbld.addAuthorityKeyIdExt(authKey);
+    }
+
+    private static void addCommonCAExts(CertificateBuilder cbld)
+            throws IOException {
+        cbld.addBasicConstraintsExt(true, true, -1);
+        // Set key usage bits for digitalSignature, keyCertSign and cRLSign
+        boolean[] kuBitSettings = {true, false, false, false, false, true,
+            true, false, false};
+        cbld.addKeyUsageExt(kuBitSettings);
+    }
+
+    /**
+     * Helper routine that dumps only a few cert fields rather than
+     * the whole toString() output.
+     *
+     * @param cert an X509Certificate to be displayed
+     *
+     * @return the String output of the issuer, subject and
+     * serial number
+     */
+    private static String certInfo(X509Certificate cert) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("Issuer: ").append(cert.getIssuerX500Principal()).
+                append("\n");
+        sb.append("Subject: ").append(cert.getSubjectX500Principal()).
+                append("\n");
+        sb.append("Serial: ").append(cert.getSerialNumber()).append("\n");
+        return sb.toString();
+    }
+
+    /**
+     * Log a message on stdout
+     *
+     * @param message The message to log
+     */
+    private static void log(String message) {
+        if (debug) {
+            System.out.println(message);
+        }
+    }
+
+    // The following two classes are Simple nested class to group a handful
+    // of configuration parameters used before starting a client or server.
+    // We'll just access the data members directly for convenience.
+    static class ClientParameters {
+        boolean enabled = true;
+        PKIXBuilderParameters pkixParams = null;
+        PKIXRevocationChecker revChecker = null;
+
+        ClientParameters() { }
+    }
+
+    static class ServerParameters {
+        boolean enabled = true;
+        int cacheSize = 256;
+        int cacheLifetime = 3600;
+        int respTimeout = 5000;
+        String respUri = "";
+        boolean respOverride = false;
+        boolean ignoreExts = false;
+
+        ServerParameters() { }
+    }
+
+    static class TestResult {
+        Exception serverExc = null;
+        Exception clientExc = null;
+    }
+
+    static class HtucSSLSocketFactory extends SSLSocketFactory {
+        SSLContext sslc = SSLContext.getInstance("TLS");
+
+        HtucSSLSocketFactory(ClientParameters cliParams)
+                throws GeneralSecurityException {
+            super();
+
+            // Create the Trust Manager Factory using the PKIX variant
+            TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
+
+            // If we have a customized pkixParameters then use it
+            if (cliParams.pkixParams != null) {
+                // LIf we have a customized PKIXRevocationChecker, add
+                // it to the PKIXBuilderParameters.
+                if (cliParams.revChecker != null) {
+                    cliParams.pkixParams.addCertPathChecker(
+                            cliParams.revChecker);
+                }
+
+                ManagerFactoryParameters trustParams =
+                        new CertPathTrustManagerParameters(
+                                cliParams.pkixParams);
+                tmf.init(trustParams);
+            } else {
+                tmf.init(trustStore);
+            }
+
+            sslc.init(null, tmf.getTrustManagers(), null);
+        }
+
+        @Override
+        public Socket createSocket(Socket s, String host, int port,
+                boolean autoClose) throws IOException {
+            Socket sock =  sslc.getSocketFactory().createSocket(s, host, port,
+                    autoClose);
+            setCiphers(sock);
+            return sock;
+        }
+
+        @Override
+        public Socket createSocket(InetAddress host, int port)
+                throws IOException {
+            Socket sock = sslc.getSocketFactory().createSocket(host, port);
+            setCiphers(sock);
+            return sock;
+        }
+
+        @Override
+        public Socket createSocket(InetAddress host, int port,
+                InetAddress localAddress, int localPort) throws IOException {
+            Socket sock = sslc.getSocketFactory().createSocket(host, port,
+                    localAddress, localPort);
+            setCiphers(sock);
+            return sock;
+        }
+
+        @Override
+        public Socket createSocket(String host, int port)
+                throws IOException {
+            Socket sock =  sslc.getSocketFactory().createSocket(host, port);
+            setCiphers(sock);
+            return sock;
+        }
+
+        @Override
+        public Socket createSocket(String host, int port,
+                InetAddress localAddress, int localPort)
+                throws IOException {
+            Socket sock =  sslc.getSocketFactory().createSocket(host, port,
+                    localAddress, localPort);
+            setCiphers(sock);
+            return sock;
+        }
+
+        @Override
+        public String[] getDefaultCipherSuites() {
+            return sslc.getDefaultSSLParameters().getCipherSuites();
+        }
+
+        @Override
+        public String[] getSupportedCipherSuites() {
+            return sslc.getSupportedSSLParameters().getCipherSuites();
+        }
+
+        private static void setCiphers(Socket sock) {
+            if (sock instanceof SSLSocket) {
+                String[] ciphers = { "TLS_RSA_WITH_AES_128_CBC_SHA" };
+                ((SSLSocket)sock).setEnabledCipherSuites(ciphers);
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/Stapling/SSLEngineWithStapling.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,655 @@
+/*
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary OCSP Stapling for TLS
+ * @library ../../../../java/security/testlibrary
+ * @build CertificateBuilder SimpleOCSPServer
+ * @run main/othervm SSLEngineWithStapling
+ */
+
+/**
+ * A SSLEngine usage example which simplifies the presentation
+ * by removing the I/O and multi-threading concerns.
+ *
+ * The test creates two SSLEngines, simulating a client and server.
+ * The "transport" layer consists two byte buffers:  think of them
+ * as directly connected pipes.
+ *
+ * Note, this is a *very* simple example: real code will be much more
+ * involved.  For example, different threading and I/O models could be
+ * used, transport mechanisms could close unexpectedly, and so on.
+ *
+ * When this application runs, notice that several messages
+ * (wrap/unwrap) pass before any application data is consumed or
+ * produced.  (For more information, please see the SSL/TLS
+ * specifications.)  There may several steps for a successful handshake,
+ * so it's typical to see the following series of operations:
+ *
+ *      client          server          message
+ *      ======          ======          =======
+ *      wrap()          ...             ClientHello
+ *      ...             unwrap()        ClientHello
+ *      ...             wrap()          ServerHello/Certificate
+ *      unwrap()        ...             ServerHello/Certificate
+ *      wrap()          ...             ClientKeyExchange
+ *      wrap()          ...             ChangeCipherSpec
+ *      wrap()          ...             Finished
+ *      ...             unwrap()        ClientKeyExchange
+ *      ...             unwrap()        ChangeCipherSpec
+ *      ...             unwrap()        Finished
+ *      ...             wrap()          ChangeCipherSpec
+ *      ...             wrap()          Finished
+ *      unwrap()        ...             ChangeCipherSpec
+ *      unwrap()        ...             Finished
+ */
+
+import javax.net.ssl.*;
+import javax.net.ssl.SSLEngineResult.*;
+import java.io.*;
+import java.math.BigInteger;
+import java.security.*;
+import java.nio.*;
+import java.security.cert.CertPathValidatorException;
+import java.security.cert.PKIXBuilderParameters;
+import java.security.cert.X509Certificate;
+import java.security.cert.X509CertSelector;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import sun.security.testlibrary.SimpleOCSPServer;
+import sun.security.testlibrary.CertificateBuilder;
+
+public class SSLEngineWithStapling {
+
+    /*
+     * Enables logging of the SSLEngine operations.
+     */
+    private static final boolean logging = true;
+
+    /*
+     * Enables the JSSE system debugging system property:
+     *
+     *     -Djavax.net.debug=all
+     *
+     * This gives a lot of low-level information about operations underway,
+     * including specific handshake messages, and might be best examined
+     * after gaining some familiarity with this application.
+     */
+    private static final boolean debug = false;
+
+    private SSLEngine clientEngine;     // client Engine
+    private ByteBuffer clientOut;       // write side of clientEngine
+    private ByteBuffer clientIn;        // read side of clientEngine
+
+    private SSLEngine serverEngine;     // server Engine
+    private ByteBuffer serverOut;       // write side of serverEngine
+    private ByteBuffer serverIn;        // read side of serverEngine
+
+    /*
+     * For data transport, this example uses local ByteBuffers.  This
+     * isn't really useful, but the purpose of this example is to show
+     * SSLEngine concepts, not how to do network transport.
+     */
+    private ByteBuffer cTOs;            // "reliable" transport client->server
+    private ByteBuffer sTOc;            // "reliable" transport server->client
+
+    /*
+     * The following is to set up the keystores.
+     */
+    static final String passwd = "passphrase";
+    static final String ROOT_ALIAS = "root";
+    static final String INT_ALIAS = "intermediate";
+    static final String SSL_ALIAS = "ssl";
+
+    // PKI components we will need for this test
+    static KeyStore rootKeystore;           // Root CA Keystore
+    static KeyStore intKeystore;            // Intermediate CA Keystore
+    static KeyStore serverKeystore;         // SSL Server Keystore
+    static KeyStore trustStore;             // SSL Client trust store
+    static SimpleOCSPServer rootOcsp;       // Root CA OCSP Responder
+    static int rootOcspPort;                // Port number for root OCSP
+    static SimpleOCSPServer intOcsp;        // Intermediate CA OCSP Responder
+    static int intOcspPort;                 // Port number for intermed. OCSP
+
+    /*
+     * Main entry point for this test.
+     */
+    public static void main(String args[]) throws Exception {
+        if (debug) {
+            System.setProperty("javax.net.debug", "ssl");
+        }
+
+        // Create the PKI we will use for the test and start the OCSP servers
+        createPKI();
+
+        // Set the certificate entry in the intermediate OCSP responder
+        // with a revocation date of 8 hours ago.
+        X509Certificate sslCert =
+                (X509Certificate)serverKeystore.getCertificate(SSL_ALIAS);
+        Map<BigInteger, SimpleOCSPServer.CertStatusInfo> revInfo =
+            new HashMap<>();
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_REVOKED,
+                        new Date(System.currentTimeMillis() -
+                                TimeUnit.HOURS.toMillis(8))));
+        intOcsp.updateStatusDb(revInfo);
+
+        SSLEngineWithStapling test = new SSLEngineWithStapling();
+        try {
+            test.runTest();
+            throw new RuntimeException("Expected failure due to revocation " +
+                    "did not occur");
+        } catch (Exception e) {
+            if (!checkClientValidationFailure(e,
+                    CertPathValidatorException.BasicReason.REVOKED)) {
+                System.out.println("*** Didn't find the exception we wanted");
+                throw e;
+            }
+        }
+
+        System.out.println("Test Passed.");
+    }
+
+    /*
+     * Create an initialized SSLContext to use for these tests.
+     */
+    public SSLEngineWithStapling() throws Exception {
+        System.setProperty("javax.net.ssl.keyStore", "");
+        System.setProperty("javax.net.ssl.keyStorePassword", "");
+        System.setProperty("javax.net.ssl.trustStore", "");
+        System.setProperty("javax.net.ssl.trustStorePassword", "");
+
+        // Enable OCSP Stapling on both client and server sides, but turn off
+        // client-side OCSP for revocation checking.  This ensures that the
+        // revocation information from the test has to come via stapling.
+        System.setProperty("jdk.tls.client.enableStatusRequestExtension",
+                Boolean.toString(true));
+        System.setProperty("jdk.tls.server.enableStatusRequestExtension",
+                Boolean.toString(true));
+        Security.setProperty("ocsp.enable", "false");
+    }
+
+    /*
+     * Run the test.
+     *
+     * Sit in a tight loop, both engines calling wrap/unwrap regardless
+     * of whether data is available or not.  We do this until both engines
+     * report back they are closed.
+     *
+     * The main loop handles all of the I/O phases of the SSLEngine's
+     * lifetime:
+     *
+     *     initial handshaking
+     *     application data transfer
+     *     engine closing
+     *
+     * One could easily separate these phases into separate
+     * sections of code.
+     */
+    private void runTest() throws Exception {
+        boolean dataDone = false;
+
+        createSSLEngines();
+        createBuffers();
+
+        SSLEngineResult clientResult;   // results from client's last operation
+        SSLEngineResult serverResult;   // results from server's last operation
+
+        /*
+         * Examining the SSLEngineResults could be much more involved,
+         * and may alter the overall flow of the application.
+         *
+         * For example, if we received a BUFFER_OVERFLOW when trying
+         * to write to the output pipe, we could reallocate a larger
+         * pipe, but instead we wait for the peer to drain it.
+         */
+        while (!isEngineClosed(clientEngine) ||
+                !isEngineClosed(serverEngine)) {
+
+            log("================");
+
+            clientResult = clientEngine.wrap(clientOut, cTOs);
+            log("client wrap: ", clientResult);
+            runDelegatedTasks(clientResult, clientEngine);
+
+            serverResult = serverEngine.wrap(serverOut, sTOc);
+            log("server wrap: ", serverResult);
+            runDelegatedTasks(serverResult, serverEngine);
+
+            cTOs.flip();
+            sTOc.flip();
+
+            log("----");
+
+            clientResult = clientEngine.unwrap(sTOc, clientIn);
+            log("client unwrap: ", clientResult);
+            runDelegatedTasks(clientResult, clientEngine);
+
+            serverResult = serverEngine.unwrap(cTOs, serverIn);
+            log("server unwrap: ", serverResult);
+            runDelegatedTasks(serverResult, serverEngine);
+
+            cTOs.compact();
+            sTOc.compact();
+
+            /*
+             * After we've transfered all application data between the client
+             * and server, we close the clientEngine's outbound stream.
+             * This generates a close_notify handshake message, which the
+             * server engine receives and responds by closing itself.
+             */
+            if (!dataDone && (clientOut.limit() == serverIn.position()) &&
+                    (serverOut.limit() == clientIn.position())) {
+
+                /*
+                 * A sanity check to ensure we got what was sent.
+                 */
+                checkTransfer(serverOut, clientIn);
+                checkTransfer(clientOut, serverIn);
+
+                log("\tClosing clientEngine's *OUTBOUND*...");
+                clientEngine.closeOutbound();
+                dataDone = true;
+            }
+        }
+    }
+
+    /*
+     * Using the SSLContext created during object creation,
+     * create/configure the SSLEngines we'll use for this test.
+     */
+    private void createSSLEngines() throws Exception {
+        // Initialize the KeyManager and TrustManager for the server
+        KeyManagerFactory servKmf = KeyManagerFactory.getInstance("PKIX");
+        servKmf.init(serverKeystore, passwd.toCharArray());
+        TrustManagerFactory servTmf =
+                TrustManagerFactory.getInstance("PKIX");
+        servTmf.init(trustStore);
+
+        // Initialize the TrustManager for the client with revocation checking
+        PKIXBuilderParameters pkixParams = new PKIXBuilderParameters(trustStore,
+                new X509CertSelector());
+        pkixParams.setRevocationEnabled(true);
+        ManagerFactoryParameters mfp =
+                new CertPathTrustManagerParameters(pkixParams);
+        TrustManagerFactory cliTmf =
+                TrustManagerFactory.getInstance("PKIX");
+        cliTmf.init(mfp);
+
+        // Create the SSLContexts from the factories
+        SSLContext servCtx = SSLContext.getInstance("TLS");
+        servCtx.init(servKmf.getKeyManagers(), servTmf.getTrustManagers(),
+                null);
+        SSLContext cliCtx = SSLContext.getInstance("TLS");
+        cliCtx.init(null, cliTmf.getTrustManagers(), null);
+
+
+        /*
+         * Configure the serverEngine to act as a server in the SSL/TLS
+         * handshake.
+         */
+        serverEngine = servCtx.createSSLEngine();
+        serverEngine.setUseClientMode(false);
+        serverEngine.setNeedClientAuth(false);
+
+        /*
+         * Similar to above, but using client mode instead.
+         */
+        clientEngine = cliCtx.createSSLEngine("client", 80);
+        clientEngine.setUseClientMode(true);
+    }
+
+    /*
+     * Create and size the buffers appropriately.
+     */
+    private void createBuffers() {
+
+        /*
+         * We'll assume the buffer sizes are the same
+         * between client and server.
+         */
+        SSLSession session = clientEngine.getSession();
+        int appBufferMax = session.getApplicationBufferSize();
+        int netBufferMax = session.getPacketBufferSize();
+
+        /*
+         * We'll make the input buffers a bit bigger than the max needed
+         * size, so that unwrap()s following a successful data transfer
+         * won't generate BUFFER_OVERFLOWS.
+         *
+         * We'll use a mix of direct and indirect ByteBuffers for
+         * tutorial purposes only.  In reality, only use direct
+         * ByteBuffers when they give a clear performance enhancement.
+         */
+        clientIn = ByteBuffer.allocate(appBufferMax + 50);
+        serverIn = ByteBuffer.allocate(appBufferMax + 50);
+
+        cTOs = ByteBuffer.allocateDirect(netBufferMax);
+        sTOc = ByteBuffer.allocateDirect(netBufferMax);
+
+        clientOut = ByteBuffer.wrap("Hi Server, I'm Client".getBytes());
+        serverOut = ByteBuffer.wrap("Hello Client, I'm Server".getBytes());
+    }
+
+    /*
+     * If the result indicates that we have outstanding tasks to do,
+     * go ahead and run them in this thread.
+     */
+    private static void runDelegatedTasks(SSLEngineResult result,
+            SSLEngine engine) throws Exception {
+
+        if (result.getHandshakeStatus() == HandshakeStatus.NEED_TASK) {
+            Runnable runnable;
+            while ((runnable = engine.getDelegatedTask()) != null) {
+                log("\trunning delegated task...");
+                runnable.run();
+            }
+            HandshakeStatus hsStatus = engine.getHandshakeStatus();
+            if (hsStatus == HandshakeStatus.NEED_TASK) {
+                throw new Exception(
+                    "handshake shouldn't need additional tasks");
+            }
+            log("\tnew HandshakeStatus: " + hsStatus);
+        }
+    }
+
+    private static boolean isEngineClosed(SSLEngine engine) {
+        return (engine.isOutboundDone() && engine.isInboundDone());
+    }
+
+    /*
+     * Simple check to make sure everything came across as expected.
+     */
+    private static void checkTransfer(ByteBuffer a, ByteBuffer b)
+            throws Exception {
+        a.flip();
+        b.flip();
+
+        if (!a.equals(b)) {
+            throw new Exception("Data didn't transfer cleanly");
+        } else {
+            log("\tData transferred cleanly");
+        }
+
+        a.position(a.limit());
+        b.position(b.limit());
+        a.limit(a.capacity());
+        b.limit(b.capacity());
+    }
+
+    /*
+     * Logging code
+     */
+    private static boolean resultOnce = true;
+
+    private static void log(String str, SSLEngineResult result) {
+        if (!logging) {
+            return;
+        }
+        if (resultOnce) {
+            resultOnce = false;
+            System.out.println("The format of the SSLEngineResult is: \n" +
+                "\t\"getStatus() / getHandshakeStatus()\" +\n" +
+                "\t\"bytesConsumed() / bytesProduced()\"\n");
+        }
+        HandshakeStatus hsStatus = result.getHandshakeStatus();
+        log(str +
+            result.getStatus() + "/" + hsStatus + ", " +
+            result.bytesConsumed() + "/" + result.bytesProduced() +
+            " bytes");
+        if (hsStatus == HandshakeStatus.FINISHED) {
+            log("\t...ready for application data");
+        }
+    }
+
+    private static void log(String str) {
+        if (logging) {
+            System.out.println(str);
+        }
+    }
+
+        /**
+     * Creates the PKI components necessary for this test, including
+     * Root CA, Intermediate CA and SSL server certificates, the keystores
+     * for each entity, a client trust store, and starts the OCSP responders.
+     */
+    private static void createPKI() throws Exception {
+        CertificateBuilder cbld = new CertificateBuilder();
+        KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
+        keyGen.initialize(2048);
+        KeyStore.Builder keyStoreBuilder =
+                KeyStore.Builder.newInstance("PKCS12", null,
+                        new KeyStore.PasswordProtection(passwd.toCharArray()));
+
+        // Generate Root, IntCA, EE keys
+        KeyPair rootCaKP = keyGen.genKeyPair();
+        log("Generated Root CA KeyPair");
+        KeyPair intCaKP = keyGen.genKeyPair();
+        log("Generated Intermediate CA KeyPair");
+        KeyPair sslKP = keyGen.genKeyPair();
+        log("Generated SSL Cert KeyPair");
+
+        // Set up the Root CA Cert
+        cbld.setSubjectName("CN=Root CA Cert, O=SomeCompany");
+        cbld.setPublicKey(rootCaKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("1"));
+        // Make a 3 year validity starting from 60 days ago
+        long start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(60);
+        long end = start + TimeUnit.DAYS.toMillis(1085);
+        cbld.setValidity(new Date(start), new Date(end));
+        addCommonExts(cbld, rootCaKP.getPublic(), rootCaKP.getPublic());
+        addCommonCAExts(cbld);
+        // Make our Root CA Cert!
+        X509Certificate rootCert = cbld.build(null, rootCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("Root CA Created:\n" + certInfo(rootCert));
+
+        // Now build a keystore and add the keys and cert
+        rootKeystore = keyStoreBuilder.getKeyStore();
+        java.security.cert.Certificate[] rootChain = {rootCert};
+        rootKeystore.setKeyEntry(ROOT_ALIAS, rootCaKP.getPrivate(),
+                passwd.toCharArray(), rootChain);
+
+        // Now fire up the OCSP responder
+        rootOcsp = new SimpleOCSPServer(rootKeystore, passwd, ROOT_ALIAS, null);
+        rootOcsp.enableLog(logging);
+        rootOcsp.setNextUpdateInterval(3600);
+        rootOcsp.start();
+        Thread.sleep(1000);         // Give the server a second to start up
+        rootOcspPort = rootOcsp.getPort();
+        String rootRespURI = "http://localhost:" + rootOcspPort;
+        log("Root OCSP Responder URI is " + rootRespURI);
+
+        // Now that we have the root keystore and OCSP responder we can
+        // create our intermediate CA.
+        cbld.reset();
+        cbld.setSubjectName("CN=Intermediate CA Cert, O=SomeCompany");
+        cbld.setPublicKey(intCaKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("100"));
+        // Make a 2 year validity starting from 30 days ago
+        start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(30);
+        end = start + TimeUnit.DAYS.toMillis(730);
+        cbld.setValidity(new Date(start), new Date(end));
+        addCommonExts(cbld, intCaKP.getPublic(), rootCaKP.getPublic());
+        addCommonCAExts(cbld);
+        cbld.addAIAExt(Collections.singletonList(rootRespURI));
+        // Make our Intermediate CA Cert!
+        X509Certificate intCaCert = cbld.build(rootCert, rootCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("Intermediate CA Created:\n" + certInfo(intCaCert));
+
+        // Provide intermediate CA cert revocation info to the Root CA
+        // OCSP responder.
+        Map<BigInteger, SimpleOCSPServer.CertStatusInfo> revInfo =
+            new HashMap<>();
+        revInfo.put(intCaCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        rootOcsp.updateStatusDb(revInfo);
+
+        // Now build a keystore and add the keys, chain and root cert as a TA
+        intKeystore = keyStoreBuilder.getKeyStore();
+        java.security.cert.Certificate[] intChain = {intCaCert, rootCert};
+        intKeystore.setKeyEntry(INT_ALIAS, intCaKP.getPrivate(),
+                passwd.toCharArray(), intChain);
+        intKeystore.setCertificateEntry(ROOT_ALIAS, rootCert);
+
+        // Now fire up the Intermediate CA OCSP responder
+        intOcsp = new SimpleOCSPServer(intKeystore, passwd,
+                INT_ALIAS, null);
+        intOcsp.enableLog(logging);
+        intOcsp.setNextUpdateInterval(3600);
+        intOcsp.start();
+        Thread.sleep(1000);
+        intOcspPort = intOcsp.getPort();
+        String intCaRespURI = "http://localhost:" + intOcspPort;
+        log("Intermediate CA OCSP Responder URI is " + intCaRespURI);
+
+        // Last but not least, let's make our SSLCert and add it to its own
+        // Keystore
+        cbld.reset();
+        cbld.setSubjectName("CN=SSLCertificate, O=SomeCompany");
+        cbld.setPublicKey(sslKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("4096"));
+        // Make a 1 year validity starting from 7 days ago
+        start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(7);
+        end = start + TimeUnit.DAYS.toMillis(365);
+        cbld.setValidity(new Date(start), new Date(end));
+
+        // Add extensions
+        addCommonExts(cbld, sslKP.getPublic(), intCaKP.getPublic());
+        boolean[] kuBits = {true, false, true, false, false, false,
+            false, false, false};
+        cbld.addKeyUsageExt(kuBits);
+        List<String> ekuOids = new ArrayList<>();
+        ekuOids.add("1.3.6.1.5.5.7.3.1");
+        ekuOids.add("1.3.6.1.5.5.7.3.2");
+        cbld.addExtendedKeyUsageExt(ekuOids);
+        cbld.addSubjectAltNameDNSExt(Collections.singletonList("localhost"));
+        cbld.addAIAExt(Collections.singletonList(intCaRespURI));
+        // Make our SSL Server Cert!
+        X509Certificate sslCert = cbld.build(intCaCert, intCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("SSL Certificate Created:\n" + certInfo(sslCert));
+
+        // Provide SSL server cert revocation info to the Intermeidate CA
+        // OCSP responder.
+        revInfo = new HashMap<>();
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        intOcsp.updateStatusDb(revInfo);
+
+        // Now build a keystore and add the keys, chain and root cert as a TA
+        serverKeystore = keyStoreBuilder.getKeyStore();
+        java.security.cert.Certificate[] sslChain = {sslCert, intCaCert, rootCert};
+        serverKeystore.setKeyEntry(SSL_ALIAS, sslKP.getPrivate(),
+                passwd.toCharArray(), sslChain);
+        serverKeystore.setCertificateEntry(ROOT_ALIAS, rootCert);
+
+        // And finally a Trust Store for the client
+        trustStore = keyStoreBuilder.getKeyStore();
+        trustStore.setCertificateEntry(ROOT_ALIAS, rootCert);
+    }
+
+    private static void addCommonExts(CertificateBuilder cbld,
+            PublicKey subjKey, PublicKey authKey) throws IOException {
+        cbld.addSubjectKeyIdExt(subjKey);
+        cbld.addAuthorityKeyIdExt(authKey);
+    }
+
+    private static void addCommonCAExts(CertificateBuilder cbld)
+            throws IOException {
+        cbld.addBasicConstraintsExt(true, true, -1);
+        // Set key usage bits for digitalSignature, keyCertSign and cRLSign
+        boolean[] kuBitSettings = {true, false, false, false, false, true,
+            true, false, false};
+        cbld.addKeyUsageExt(kuBitSettings);
+    }
+
+    /**
+     * Helper routine that dumps only a few cert fields rather than
+     * the whole toString() output.
+     *
+     * @param cert an X509Certificate to be displayed
+     *
+     * @return the String output of the issuer, subject and
+     * serial number
+     */
+    private static String certInfo(X509Certificate cert) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("Issuer: ").append(cert.getIssuerX500Principal()).
+                append("\n");
+        sb.append("Subject: ").append(cert.getSubjectX500Principal()).
+                append("\n");
+        sb.append("Serial: ").append(cert.getSerialNumber()).append("\n");
+        return sb.toString();
+    }
+
+    /**
+     * Checks a validation failure to see if it failed for the reason we think
+     * it should.  This comes in as an SSLException of some sort, but it
+     * encapsulates a ValidatorException which in turn encapsulates the
+     * CertPathValidatorException we are interested in.
+     *
+     * @param e the exception thrown at the top level
+     * @param reason the underlying CertPathValidatorException BasicReason
+     * we are expecting it to have.
+     *
+     * @return true if the reason matches up, false otherwise.
+     */
+    static boolean checkClientValidationFailure(Exception e,
+            CertPathValidatorException.BasicReason reason) {
+        boolean result = false;
+
+        if (e instanceof SSLException) {
+            Throwable sslhe = e.getCause();
+            if (sslhe instanceof SSLHandshakeException) {
+                Throwable valExc = sslhe.getCause();
+                if (valExc instanceof sun.security.validator.ValidatorException) {
+                    Throwable cause = valExc.getCause();
+                    if (cause instanceof CertPathValidatorException) {
+                        CertPathValidatorException cpve =
+                                (CertPathValidatorException)cause;
+                        if (cpve.getReason() == reason) {
+                            result = true;
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/Stapling/SSLSocketWithStapling.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,905 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary OCSP Stapling for TLS
+ * @library ../../../../java/security/testlibrary
+ * @build CertificateBuilder SimpleOCSPServer
+ * @run main/othervm SSLSocketWithStapling
+ */
+
+import java.io.*;
+import java.math.BigInteger;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import javax.net.ssl.*;
+import java.security.KeyStore;
+import java.security.PublicKey;
+import java.security.Security;
+import java.security.cert.CertPathValidator;
+import java.security.cert.CertPathValidatorException;
+import java.security.cert.CertPathValidatorException.BasicReason;
+import java.security.cert.Certificate;
+import java.security.cert.PKIXBuilderParameters;
+import java.security.cert.X509CertSelector;
+import java.security.cert.X509Certificate;
+import java.security.cert.PKIXRevocationChecker;
+import java.security.cert.PKIXRevocationChecker.Option;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.concurrent.TimeUnit;
+
+import sun.security.testlibrary.SimpleOCSPServer;
+import sun.security.testlibrary.CertificateBuilder;
+
+public class SSLSocketWithStapling {
+
+    /*
+     * =============================================================
+     * Set the various variables needed for the tests, then
+     * specify what tests to run on each side.
+     */
+
+    // Turn on TLS debugging
+    static boolean debug = false;
+
+    /*
+     * Should we run the client or server in a separate thread?
+     * Both sides can throw exceptions, but do you have a preference
+     * as to which side should be the main thread.
+     */
+    static boolean separateServerThread = true;
+    Thread clientThread = null;
+    Thread serverThread = null;
+
+    static String passwd = "passphrase";
+    static String ROOT_ALIAS = "root";
+    static String INT_ALIAS = "intermediate";
+    static String SSL_ALIAS = "ssl";
+
+    /*
+     * Is the server ready to serve?
+     */
+    volatile static boolean serverReady = false;
+    volatile int serverPort = 0;
+
+    volatile Exception serverException = null;
+    volatile Exception clientException = null;
+
+    // PKI components we will need for this test
+    static KeyStore rootKeystore;           // Root CA Keystore
+    static KeyStore intKeystore;            // Intermediate CA Keystore
+    static KeyStore serverKeystore;         // SSL Server Keystore
+    static KeyStore trustStore;             // SSL Client trust store
+    static SimpleOCSPServer rootOcsp;       // Root CA OCSP Responder
+    static int rootOcspPort;                // Port number for root OCSP
+    static SimpleOCSPServer intOcsp;        // Intermediate CA OCSP Responder
+    static int intOcspPort;                 // Port number for intermed. OCSP
+
+    /*
+     * If the client or server is doing some kind of object creation
+     * that the other side depends on, and that thread prematurely
+     * exits, you may experience a hang.  The test harness will
+     * terminate all hung threads after its timeout has expired,
+     * currently 3 minutes by default, but you might try to be
+     * smart about it....
+     */
+    public static void main(String[] args) throws Exception {
+        if (debug) {
+            System.setProperty("javax.net.debug", "ssl");
+        }
+
+        // Create the PKI we will use for the test and start the OCSP servers
+        createPKI();
+
+        testAllDefault();
+        testPKIXParametersRevEnabled();
+        testRevokedCertificate();
+        testHardFailFallback();
+        testSoftFailFallback();
+        testLatencyNoStaple(false);
+        testLatencyNoStaple(true);
+
+        // shut down the OCSP responders before finishing the test
+        intOcsp.stop();
+        rootOcsp.stop();
+    }
+
+    /**
+     * Default test using no externally-configured PKIXBuilderParameters
+     */
+    static void testAllDefault() throws Exception {
+        ClientParameters cliParams = new ClientParameters();
+        ServerParameters servParams = new ServerParameters();
+        serverReady = false;
+        Map<BigInteger, SimpleOCSPServer.CertStatusInfo> revInfo =
+                new HashMap<>();
+
+        // We will prove revocation checking is disabled by marking the SSL
+        // certificate as revoked.  The test would only pass if revocation
+        // checking did not happen.
+        X509Certificate sslCert =
+                (X509Certificate)serverKeystore.getCertificate(SSL_ALIAS);
+        Date fiveMinsAgo = new Date(System.currentTimeMillis() -
+                TimeUnit.MINUTES.toMillis(5));
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_REVOKED,
+                        fiveMinsAgo));
+        intOcsp.updateStatusDb(revInfo);
+
+        System.out.println("=======================================");
+        System.out.println("Stapling enabled, default configuration");
+        System.out.println("=======================================");
+
+        SSLSocketWithStapling sslTest = new SSLSocketWithStapling(cliParams,
+                servParams);
+        TestResult tr = sslTest.getResult();
+        if (tr.clientExc != null) {
+            throw tr.clientExc;
+        } else if (tr.serverExc != null) {
+            throw tr.serverExc;
+        }
+
+        // Return the ssl certificate to non-revoked status
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        intOcsp.updateStatusDb(revInfo);
+
+        System.out.println("                PASS");
+        System.out.println("=======================================\n");
+    }
+
+    /**
+     * Do a basic connection using PKIXParameters with revocation checking
+     * enabled and client-side OCSP disabled.  It will only pass if all
+     * stapled responses are present, valid and have a GOOD status.
+     */
+    static void testPKIXParametersRevEnabled() throws Exception {
+        ClientParameters cliParams = new ClientParameters();
+        ServerParameters servParams = new ServerParameters();
+        serverReady = false;
+
+        System.out.println("=====================================");
+        System.out.println("Stapling enabled, PKIXParameters with");
+        System.out.println("Revocation checking enabled ");
+        System.out.println("=====================================");
+
+        cliParams.pkixParams = new PKIXBuilderParameters(trustStore,
+                new X509CertSelector());
+        cliParams.pkixParams.setRevocationEnabled(true);
+        Security.setProperty("ocsp.enable", "false");
+
+        SSLSocketWithStapling sslTest = new SSLSocketWithStapling(cliParams,
+                servParams);
+        TestResult tr = sslTest.getResult();
+        if (tr.clientExc != null) {
+            throw tr.clientExc;
+        } else if (tr.serverExc != null) {
+            throw tr.serverExc;
+        }
+
+        System.out.println("                PASS");
+        System.out.println("=====================================\n");
+    }
+
+    /**
+     * Perform a test where the certificate is revoked and placed in the
+     * TLS handshake.  Client-side OCSP is disabled, so this test will only
+     * pass if the OCSP response is found, since we will check the
+     * CertPathValidatorException reason for revoked status.
+     */
+    static void testRevokedCertificate() throws Exception {
+        ClientParameters cliParams = new ClientParameters();
+        ServerParameters servParams = new ServerParameters();
+        serverReady = false;
+        Map<BigInteger, SimpleOCSPServer.CertStatusInfo> revInfo =
+                new HashMap<>();
+
+        // We will prove revocation checking is disabled by marking the SSL
+        // certificate as revoked.  The test would only pass if revocation
+        // checking did not happen.
+        X509Certificate sslCert =
+                (X509Certificate)serverKeystore.getCertificate(SSL_ALIAS);
+        Date fiveMinsAgo = new Date(System.currentTimeMillis() -
+                TimeUnit.MINUTES.toMillis(5));
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_REVOKED,
+                        fiveMinsAgo));
+        intOcsp.updateStatusDb(revInfo);
+
+        System.out.println("=======================================");
+        System.out.println("Stapling enabled, default configuration");
+        System.out.println("=======================================");
+
+        cliParams.pkixParams = new PKIXBuilderParameters(trustStore,
+                new X509CertSelector());
+        cliParams.pkixParams.setRevocationEnabled(true);
+        Security.setProperty("ocsp.enable", "false");
+
+        SSLSocketWithStapling sslTest = new SSLSocketWithStapling(cliParams,
+                servParams);
+        TestResult tr = sslTest.getResult();
+        if (!checkClientValidationFailure(tr.clientExc, BasicReason.REVOKED)) {
+            if (tr.clientExc != null) {
+                throw tr.clientExc;
+            } else {
+                throw new RuntimeException(
+                        "Expected client failure, but the client succeeded");
+            }
+        }
+
+        // Return the ssl certificate to non-revoked status
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        intOcsp.updateStatusDb(revInfo);
+
+        System.out.println("                 PASS");
+        System.out.println("=======================================\n");
+    }
+
+    /**
+     * Test a case where client-side stapling is attempted, but does not
+     * occur because OCSP responders are unreachable.  This should use a
+     * default hard-fail behavior.
+     */
+    static void testHardFailFallback() throws Exception {
+        ClientParameters cliParams = new ClientParameters();
+        ServerParameters servParams = new ServerParameters();
+        serverReady = false;
+
+        // Stop the OCSP responders and give a 1 second delay before
+        // running the test.
+        intOcsp.stop();
+        rootOcsp.stop();
+        Thread.sleep(1000);
+
+        System.out.println("=======================================");
+        System.out.println("Stapling enbled in client and server,");
+        System.out.println("but OCSP responders disabled.");
+        System.out.println("PKIXParameters with Revocation checking");
+        System.out.println("enabled.");
+        System.out.println("=======================================");
+
+        Security.setProperty("ocsp.enable", "true");
+        cliParams.pkixParams = new PKIXBuilderParameters(trustStore,
+                new X509CertSelector());
+        cliParams.pkixParams.setRevocationEnabled(true);
+
+        SSLSocketWithStapling sslTest = new SSLSocketWithStapling(cliParams,
+                servParams);
+        TestResult tr = sslTest.getResult();
+        if (!checkClientValidationFailure(tr.clientExc,
+                BasicReason.UNDETERMINED_REVOCATION_STATUS)) {
+            if (tr.clientExc != null) {
+                throw tr.clientExc;
+            } else {
+                throw new RuntimeException(
+                        "Expected client failure, but the client succeeded");
+            }
+        }
+
+        System.out.println("                 PASS");
+        System.out.println("=======================================\n");
+
+        // Start the OCSP responders up again
+        intOcsp.start();
+        rootOcsp.start();
+    }
+
+    /**
+     * Test a case where client-side stapling is attempted, but does not
+     * occur because OCSP responders are unreachable.  Client-side OCSP
+     * checking is enabled for this, with SOFT_FAIL.
+     */
+    static void testSoftFailFallback() throws Exception {
+        ClientParameters cliParams = new ClientParameters();
+        ServerParameters servParams = new ServerParameters();
+        serverReady = false;
+
+        // Stop the OCSP responders and give a 1 second delay before
+        // running the test.
+        intOcsp.stop();
+        rootOcsp.stop();
+        Thread.sleep(1000);
+
+        System.out.println("=======================================");
+        System.out.println("Stapling enbled in client and server,");
+        System.out.println("but OCSP responders disabled.");
+        System.out.println("PKIXParameters with Revocation checking");
+        System.out.println("enabled and SOFT_FAIL.");
+        System.out.println("=======================================");
+
+        Security.setProperty("ocsp.enable", "true");
+        cliParams.pkixParams = new PKIXBuilderParameters(trustStore,
+                new X509CertSelector());
+        cliParams.pkixParams.setRevocationEnabled(true);
+        CertPathValidator cpv = CertPathValidator.getInstance("PKIX");
+        cliParams.revChecker =
+                (PKIXRevocationChecker)cpv.getRevocationChecker();
+        cliParams.revChecker.setOptions(EnumSet.of(Option.SOFT_FAIL));
+
+        SSLSocketWithStapling sslTest = new SSLSocketWithStapling(cliParams,
+                servParams);
+        TestResult tr = sslTest.getResult();
+        if (tr.clientExc != null) {
+            throw tr.clientExc;
+        } else if (tr.serverExc != null) {
+            throw tr.serverExc;
+        }
+
+        System.out.println("                 PASS");
+        System.out.println("=======================================\n");
+
+        // Start the OCSP responders up again
+        intOcsp.start();
+        rootOcsp.start();
+    }
+
+    /**
+     * This test initiates stapling from the client, but the server does not
+     * support OCSP stapling for this connection.  In this case it happens
+     * because the latency of the OCSP responders is longer than the server
+     * is willing to wait.  To keep the test streamlined, we will set the server
+     * latency to a 1 second wait, and set the responder latency to 3 seconds.
+     *
+     * @param fallback if we allow client-side OCSP fallback, which
+     * will change the result from the client failing with CPVE (no fallback)
+     * to a pass (fallback active).
+     */
+    static void testLatencyNoStaple(Boolean fallback) throws Exception {
+        ClientParameters cliParams = new ClientParameters();
+        ServerParameters servParams = new ServerParameters();
+        serverReady = false;
+
+        // Stop the OCSP responders and give a 1 second delay before
+        // running the test.
+        intOcsp.stop();
+        rootOcsp.stop();
+        Thread.sleep(1000);
+        intOcsp.setDelay(3000);
+        rootOcsp.setDelay(3000);
+        rootOcsp.start();
+        intOcsp.start();
+        Thread.sleep(1000);
+
+        System.out.println("========================================");
+        System.out.println("Stapling enbled in client.  Server does");
+        System.out.println("not support stapling due to OCSP latency.");
+        System.out.println("PKIXParameters with Revocation checking");
+        System.out.println("enabled, client-side OCSP checking is.");
+        System.out.println(fallback ? "enabled" : "disabled");
+        System.out.println("========================================");
+
+        Security.setProperty("ocsp.enable", fallback.toString());
+        cliParams.pkixParams = new PKIXBuilderParameters(trustStore,
+                new X509CertSelector());
+        cliParams.pkixParams.setRevocationEnabled(true);
+        servParams.respTimeout = 1000;
+
+        SSLSocketWithStapling sslTest = new SSLSocketWithStapling(cliParams,
+                servParams);
+        TestResult tr = sslTest.getResult();
+
+        if (fallback) {
+            if (tr.clientExc != null) {
+                throw tr.clientExc;
+            } else if (tr.serverExc != null) {
+                throw tr.serverExc;
+            }
+        } else {
+            if (!checkClientValidationFailure(tr.clientExc,
+                    BasicReason.UNDETERMINED_REVOCATION_STATUS)) {
+                if (tr.clientExc != null) {
+                    throw tr.clientExc;
+                } else {
+                    throw new RuntimeException(
+                        "Expected client failure, but the client succeeded");
+                }
+            }
+        }
+        System.out.println("                 PASS");
+        System.out.println("========================================\n");
+
+        // Remove the OCSP responder latency
+        intOcsp.stop();
+        rootOcsp.stop();
+        Thread.sleep(1000);
+        intOcsp.setDelay(0);
+        rootOcsp.setDelay(0);
+        rootOcsp.start();
+        intOcsp.start();
+    }
+
+    /*
+     * Define the server side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doServerSide(ServerParameters servParams) throws Exception {
+
+        // Selectively enable or disable the feature
+        System.setProperty("jdk.tls.server.enableStatusRequestExtension",
+                Boolean.toString(servParams.enabled));
+
+        // Set all the other operating parameters
+        System.setProperty("jdk.tls.stapling.cacheSize",
+                Integer.toString(servParams.cacheSize));
+        System.setProperty("jdk.tls.stapling.cacheLifetime",
+                Integer.toString(servParams.cacheLifetime));
+        System.setProperty("jdk.tls.stapling.responseTimeout",
+                Integer.toString(servParams.respTimeout));
+        System.setProperty("jdk.tls.stapling.responderURI", servParams.respUri);
+        System.setProperty("jdk.tls.stapling.responderOverride",
+                Boolean.toString(servParams.respOverride));
+        System.setProperty("jdk.tls.stapling.ignoreExtensions",
+                Boolean.toString(servParams.ignoreExts));
+
+        // Set keystores and trust stores for the server
+        KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+        kmf.init(serverKeystore, passwd.toCharArray());
+        TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
+        tmf.init(trustStore);
+
+        SSLContext sslc = SSLContext.getInstance("TLS");
+        sslc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+
+        SSLServerSocketFactory sslssf = sslc.getServerSocketFactory();
+        SSLServerSocket sslServerSocket =
+            (SSLServerSocket) sslssf.createServerSocket(serverPort);
+
+        serverPort = sslServerSocket.getLocalPort();
+
+        /*
+         * Signal Client, we're ready for his connect.
+         */
+        serverReady = true;
+
+        try (SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
+                InputStream sslIS = sslSocket.getInputStream();
+                OutputStream sslOS = sslSocket.getOutputStream()) {
+            int numberIn = sslIS.read();
+            int numberSent = 85;
+            log("Server received number: " + numberIn);
+            sslOS.write(numberSent);
+            sslOS.flush();
+            log("Server sent number: " + numberSent);
+        }
+    }
+
+    /*
+     * Define the client side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doClientSide(ClientParameters cliParams) throws Exception {
+
+        /*
+         * Wait for server to get started.
+         */
+        while (!serverReady) {
+            Thread.sleep(50);
+        }
+
+        // Selectively enable or disable the feature
+        System.setProperty("jdk.tls.client.enableStatusRequestExtension",
+                Boolean.toString(cliParams.enabled));
+
+        // Create the Trust Manager Factory using the PKIX variant
+        TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
+
+        // If we have a customized pkixParameters then use it
+        if (cliParams.pkixParams != null) {
+            // LIf we have a customized PKIXRevocationChecker, add
+            // it to the PKIXBuilderParameters.
+            if (cliParams.revChecker != null) {
+                cliParams.pkixParams.addCertPathChecker(cliParams.revChecker);
+            }
+
+            ManagerFactoryParameters trustParams =
+                    new CertPathTrustManagerParameters(cliParams.pkixParams);
+            tmf.init(trustParams);
+        } else {
+            tmf.init(trustStore);
+        }
+
+        SSLContext sslc = SSLContext.getInstance("TLS");
+        sslc.init(null, tmf.getTrustManagers(), null);
+
+        SSLSocketFactory sslsf = sslc.getSocketFactory();
+        try (SSLSocket sslSocket = (SSLSocket)sslsf.createSocket("localhost",
+                serverPort);
+                InputStream sslIS = sslSocket.getInputStream();
+                OutputStream sslOS = sslSocket.getOutputStream()) {
+            int numberSent = 80;
+            sslOS.write(numberSent);
+            sslOS.flush();
+            log("Client sent number: " + numberSent);
+            int numberIn = sslIS.read();
+            log("Client received number:" + numberIn);
+        }
+    }
+
+    /*
+     * Primary constructor, used to drive remainder of the test.
+     *
+     * Fork off the other side, then do your work.
+     */
+    SSLSocketWithStapling(ClientParameters cliParams,
+            ServerParameters servParams) throws Exception {
+        Exception startException = null;
+        try {
+            if (separateServerThread) {
+                startServer(servParams, true);
+                startClient(cliParams, false);
+            } else {
+                startClient(cliParams, true);
+                startServer(servParams, false);
+            }
+        } catch (Exception e) {
+            startException = e;
+        }
+
+        /*
+         * Wait for other side to close down.
+         */
+        if (separateServerThread) {
+            if (serverThread != null) {
+                serverThread.join();
+            }
+        } else {
+            if (clientThread != null) {
+                clientThread.join();
+            }
+        }
+    }
+
+    /**
+     * Checks a validation failure to see if it failed for the reason we think
+     * it should.  This comes in as an SSLException of some sort, but it
+     * encapsulates a ValidatorException which in turn encapsulates the
+     * CertPathValidatorException we are interested in.
+     *
+     * @param e the exception thrown at the top level
+     * @param reason the underlying CertPathValidatorException BasicReason
+     * we are expecting it to have.
+     *
+     * @return true if the reason matches up, false otherwise.
+     */
+    static boolean checkClientValidationFailure(Exception e,
+            BasicReason reason) {
+        boolean result = false;
+
+        if (e instanceof SSLException) {
+            Throwable valExc = e.getCause();
+            if (valExc instanceof sun.security.validator.ValidatorException) {
+                Throwable cause = valExc.getCause();
+                if (cause instanceof CertPathValidatorException) {
+                    CertPathValidatorException cpve =
+                            (CertPathValidatorException)cause;
+                    if (cpve.getReason() == reason) {
+                        result = true;
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
+    TestResult getResult() {
+        TestResult tr = new TestResult();
+        tr.clientExc = clientException;
+        tr.serverExc = serverException;
+        return tr;
+    }
+
+    void startServer(ServerParameters servParams, boolean newThread)
+            throws Exception {
+        if (newThread) {
+            serverThread = new Thread() {
+                public void run() {
+                    try {
+                        doServerSide(servParams);
+                    } catch (Exception e) {
+                        /*
+                         * Our server thread just died.
+                         *
+                         * Release the client, if not active already...
+                         */
+                        System.err.println("Server died...");
+                        serverReady = true;
+                        serverException = e;
+                    }
+                }
+            };
+            serverThread.start();
+        } else {
+            try {
+                doServerSide(servParams);
+            } catch (Exception e) {
+                serverException = e;
+            } finally {
+                serverReady = true;
+            }
+        }
+    }
+
+    void startClient(ClientParameters cliParams, boolean newThread)
+            throws Exception {
+        if (newThread) {
+            clientThread = new Thread() {
+                public void run() {
+                    try {
+                        doClientSide(cliParams);
+                    } catch (Exception e) {
+                        /*
+                         * Our client thread just died.
+                         */
+                        System.err.println("Client died...");
+                        clientException = e;
+                    }
+                }
+            };
+            clientThread.start();
+        } else {
+            try {
+                doClientSide(cliParams);
+            } catch (Exception e) {
+                clientException = e;
+            }
+        }
+    }
+
+    /**
+     * Creates the PKI components necessary for this test, including
+     * Root CA, Intermediate CA and SSL server certificates, the keystores
+     * for each entity, a client trust store, and starts the OCSP responders.
+     */
+    private static void createPKI() throws Exception {
+        CertificateBuilder cbld = new CertificateBuilder();
+        KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
+        keyGen.initialize(2048);
+        KeyStore.Builder keyStoreBuilder =
+                KeyStore.Builder.newInstance("PKCS12", null,
+                        new KeyStore.PasswordProtection(passwd.toCharArray()));
+
+        // Generate Root, IntCA, EE keys
+        KeyPair rootCaKP = keyGen.genKeyPair();
+        log("Generated Root CA KeyPair");
+        KeyPair intCaKP = keyGen.genKeyPair();
+        log("Generated Intermediate CA KeyPair");
+        KeyPair sslKP = keyGen.genKeyPair();
+        log("Generated SSL Cert KeyPair");
+
+        // Set up the Root CA Cert
+        cbld.setSubjectName("CN=Root CA Cert, O=SomeCompany");
+        cbld.setPublicKey(rootCaKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("1"));
+        // Make a 3 year validity starting from 60 days ago
+        long start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(60);
+        long end = start + TimeUnit.DAYS.toMillis(1085);
+        cbld.setValidity(new Date(start), new Date(end));
+        addCommonExts(cbld, rootCaKP.getPublic(), rootCaKP.getPublic());
+        addCommonCAExts(cbld);
+        // Make our Root CA Cert!
+        X509Certificate rootCert = cbld.build(null, rootCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("Root CA Created:\n" + certInfo(rootCert));
+
+        // Now build a keystore and add the keys and cert
+        rootKeystore = keyStoreBuilder.getKeyStore();
+        Certificate[] rootChain = {rootCert};
+        rootKeystore.setKeyEntry(ROOT_ALIAS, rootCaKP.getPrivate(),
+                passwd.toCharArray(), rootChain);
+
+        // Now fire up the OCSP responder
+        rootOcsp = new SimpleOCSPServer(rootKeystore, passwd, ROOT_ALIAS, null);
+        rootOcsp.enableLog(debug);
+        rootOcsp.setNextUpdateInterval(3600);
+        rootOcsp.start();
+        Thread.sleep(1000);         // Give the server a second to start up
+        rootOcspPort = rootOcsp.getPort();
+        String rootRespURI = "http://localhost:" + rootOcspPort;
+        log("Root OCSP Responder URI is " + rootRespURI);
+
+        // Now that we have the root keystore and OCSP responder we can
+        // create our intermediate CA.
+        cbld.reset();
+        cbld.setSubjectName("CN=Intermediate CA Cert, O=SomeCompany");
+        cbld.setPublicKey(intCaKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("100"));
+        // Make a 2 year validity starting from 30 days ago
+        start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(30);
+        end = start + TimeUnit.DAYS.toMillis(730);
+        cbld.setValidity(new Date(start), new Date(end));
+        addCommonExts(cbld, intCaKP.getPublic(), rootCaKP.getPublic());
+        addCommonCAExts(cbld);
+        cbld.addAIAExt(Collections.singletonList(rootRespURI));
+        // Make our Intermediate CA Cert!
+        X509Certificate intCaCert = cbld.build(rootCert, rootCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("Intermediate CA Created:\n" + certInfo(intCaCert));
+
+        // Provide intermediate CA cert revocation info to the Root CA
+        // OCSP responder.
+        Map<BigInteger, SimpleOCSPServer.CertStatusInfo> revInfo =
+            new HashMap<>();
+        revInfo.put(intCaCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        rootOcsp.updateStatusDb(revInfo);
+
+        // Now build a keystore and add the keys, chain and root cert as a TA
+        intKeystore = keyStoreBuilder.getKeyStore();
+        Certificate[] intChain = {intCaCert, rootCert};
+        intKeystore.setKeyEntry(INT_ALIAS, intCaKP.getPrivate(),
+                passwd.toCharArray(), intChain);
+        intKeystore.setCertificateEntry(ROOT_ALIAS, rootCert);
+
+        // Now fire up the Intermediate CA OCSP responder
+        intOcsp = new SimpleOCSPServer(intKeystore, passwd,
+                INT_ALIAS, null);
+        intOcsp.enableLog(debug);
+        intOcsp.setNextUpdateInterval(3600);
+        intOcsp.start();
+        Thread.sleep(1000);
+        intOcspPort = intOcsp.getPort();
+        String intCaRespURI = "http://localhost:" + intOcspPort;
+        log("Intermediate CA OCSP Responder URI is " + intCaRespURI);
+
+        // Last but not least, let's make our SSLCert and add it to its own
+        // Keystore
+        cbld.reset();
+        cbld.setSubjectName("CN=SSLCertificate, O=SomeCompany");
+        cbld.setPublicKey(sslKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("4096"));
+        // Make a 1 year validity starting from 7 days ago
+        start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(7);
+        end = start + TimeUnit.DAYS.toMillis(365);
+        cbld.setValidity(new Date(start), new Date(end));
+
+        // Add extensions
+        addCommonExts(cbld, sslKP.getPublic(), intCaKP.getPublic());
+        boolean[] kuBits = {true, false, true, false, false, false,
+            false, false, false};
+        cbld.addKeyUsageExt(kuBits);
+        List<String> ekuOids = new ArrayList<>();
+        ekuOids.add("1.3.6.1.5.5.7.3.1");
+        ekuOids.add("1.3.6.1.5.5.7.3.2");
+        cbld.addExtendedKeyUsageExt(ekuOids);
+        cbld.addSubjectAltNameDNSExt(Collections.singletonList("localhost"));
+        cbld.addAIAExt(Collections.singletonList(intCaRespURI));
+        // Make our SSL Server Cert!
+        X509Certificate sslCert = cbld.build(intCaCert, intCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("SSL Certificate Created:\n" + certInfo(sslCert));
+
+        // Provide SSL server cert revocation info to the Intermeidate CA
+        // OCSP responder.
+        revInfo = new HashMap<>();
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        intOcsp.updateStatusDb(revInfo);
+
+        // Now build a keystore and add the keys, chain and root cert as a TA
+        serverKeystore = keyStoreBuilder.getKeyStore();
+        Certificate[] sslChain = {sslCert, intCaCert, rootCert};
+        serverKeystore.setKeyEntry(SSL_ALIAS, sslKP.getPrivate(),
+                passwd.toCharArray(), sslChain);
+        serverKeystore.setCertificateEntry(ROOT_ALIAS, rootCert);
+
+        // And finally a Trust Store for the client
+        trustStore = keyStoreBuilder.getKeyStore();
+        trustStore.setCertificateEntry(ROOT_ALIAS, rootCert);
+    }
+
+    private static void addCommonExts(CertificateBuilder cbld,
+            PublicKey subjKey, PublicKey authKey) throws IOException {
+        cbld.addSubjectKeyIdExt(subjKey);
+        cbld.addAuthorityKeyIdExt(authKey);
+    }
+
+    private static void addCommonCAExts(CertificateBuilder cbld)
+            throws IOException {
+        cbld.addBasicConstraintsExt(true, true, -1);
+        // Set key usage bits for digitalSignature, keyCertSign and cRLSign
+        boolean[] kuBitSettings = {true, false, false, false, false, true,
+            true, false, false};
+        cbld.addKeyUsageExt(kuBitSettings);
+    }
+
+    /**
+     * Helper routine that dumps only a few cert fields rather than
+     * the whole toString() output.
+     *
+     * @param cert an X509Certificate to be displayed
+     *
+     * @return the String output of the issuer, subject and
+     * serial number
+     */
+    private static String certInfo(X509Certificate cert) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("Issuer: ").append(cert.getIssuerX500Principal()).
+                append("\n");
+        sb.append("Subject: ").append(cert.getSubjectX500Principal()).
+                append("\n");
+        sb.append("Serial: ").append(cert.getSerialNumber()).append("\n");
+        return sb.toString();
+    }
+
+    /**
+     * Log a message on stdout
+     *
+     * @param message The message to log
+     */
+    private static void log(String message) {
+        if (debug) {
+            System.out.println(message);
+        }
+    }
+
+    // The following two classes are Simple nested class to group a handful
+    // of configuration parameters used before starting a client or server.
+    // We'll just access the data members directly for convenience.
+    static class ClientParameters {
+        boolean enabled = true;
+        PKIXBuilderParameters pkixParams = null;
+        PKIXRevocationChecker revChecker = null;
+
+        ClientParameters() { }
+    }
+
+    static class ServerParameters {
+        boolean enabled = true;
+        int cacheSize = 256;
+        int cacheLifetime = 3600;
+        int respTimeout = 5000;
+        String respUri = "";
+        boolean respOverride = false;
+        boolean ignoreExts = false;
+
+        ServerParameters() { }
+    }
+
+    static class TestResult {
+        Exception serverExc = null;
+        Exception clientExc = null;
+    }
+
+}
--- a/jdk/test/sun/nio/cs/NIOJISAutoDetectTest.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/sun/nio/cs/NIOJISAutoDetectTest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4831163 5053096 5056440
+ * @bug 4831163 5053096 5056440 8022224
  * @summary NIO charset basic verification of JISAutodetect decoder
  * @author Martin Buchholz
  */
@@ -239,6 +239,14 @@
             check(cb.position() == 2, "cb.position()");
         }
 
+        // test #8022224
+        Charset cs = Charset.forName("x-JISAutoDetect");
+        ByteBuffer bb = ByteBuffer.wrap(new byte[] { 'a', 0x1b, 0x24, 0x40 });
+        CharBuffer cb = CharBuffer.wrap(new char[10]);
+        CoderResult cr = cs.newDecoder().decode(bb, cb, false);
+        bb.rewind();
+        cb.clear().limit(1);
+        check(cr == cs.newDecoder().decode(bb, cb, false), "#8022224");
 
         if (failures > 0)
             throw new RuntimeException(failures + " tests failed");
--- a/jdk/test/sun/security/krb5/auto/KDC.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/sun/security/krb5/auto/KDC.java	Mon Aug 10 14:05:37 2015 +0300
@@ -745,9 +745,10 @@
                     bFlags[Krb5.TKT_OPTS_FORWARDABLE] = true;
                 }
             }
+            // We do not request for addresses for FORWARDED tickets
             if (options.containsKey(Option.CHECK_ADDRESSES)
                     && body.kdcOptions.get(KDCOptions.FORWARDED)
-                    && body.addresses == null) {
+                    && body.addresses != null) {
                 throw new KrbException(Krb5.KDC_ERR_BADOPTION);
             }
             if (body.kdcOptions.get(KDCOptions.FORWARDED) ||
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/provider/certpath/Extensions/OCSPNonceExtensionTests.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,458 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary Unit tests for OCSPNonceExtension objects
+ */
+
+import java.security.cert.Extension;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.*;
+
+import sun.security.util.DerValue;
+import sun.security.util.DerInputStream;
+import sun.security.util.ObjectIdentifier;
+import sun.security.provider.certpath.OCSPNonceExtension;
+import sun.security.x509.PKIXExtensions;
+
+public class OCSPNonceExtensionTests {
+    public static final boolean DEBUG = true;
+    public static final String OCSP_NONCE_OID = "1.3.6.1.5.5.7.48.1.2";
+    public static final String ELEMENT_NONCE = "nonce";
+    public static final String EXT_NAME = "OCSPNonce";
+
+    // DER encoding for OCSP nonce extension:
+    // OID = 1.3.6.1.5.5.7.48.1.2
+    // Critical = true
+    // 48 bytes of 0xDEADBEEF
+    public static final byte[] OCSP_NONCE_DER = {
+          48,   66,    6,    9,   43,    6,    1,    5,
+           5,    7,   48,    1,    2,    1,    1,   -1,
+           4,   50,    4,   48,  -34,  -83,  -66,  -17,
+         -34,  -83,  -66,  -17,  -34,  -83,  -66,  -17,
+         -34,  -83,  -66,  -17,  -34,  -83,  -66,  -17,
+         -34,  -83,  -66,  -17,  -34,  -83,  -66,  -17,
+         -34,  -83,  -66,  -17,  -34,  -83,  -66,  -17,
+         -34,  -83,  -66,  -17,  -34,  -83,  -66,  -17,
+         -34,  -83,  -66,  -17,
+    };
+
+    // 16 bytes of 0xDEADBEEF
+    public static final byte[] DEADBEEF_16 = {
+         -34,  -83,  -66,  -17,  -34,  -83,  -66,  -17,
+         -34,  -83,  -66,  -17,  -34,  -83,  -66,  -17,
+    };
+
+    // DER encoded extension using 16 bytes of DEADBEEF
+    public static final byte[] OCSP_NONCE_DB16 = {
+          48,   31,    6,    9,   43,    6,    1,    5,
+           5,    7,   48,    1,    2,    4,   18,    4,
+          16,  -34,  -83,  -66,  -17,  -34,  -83,  -66,
+         -17,  -34,  -83,  -66,  -17,  -34,  -83,  -66,
+         -17
+    };
+
+    public static void main(String [] args) throws Exception {
+        Map<String, TestCase> testList =
+                new LinkedHashMap<String, TestCase>() {{
+            put("CTOR Test (provide length)", testCtorByLength);
+            put("CTOR Test (provide extension DER encoding)",
+                    testCtorSuperByDerValue);
+            put("Use set() call to provide random data", testResetValue);
+            put("Test get() method", testGet);
+            put("test set() method", testSet);
+            put("Test getElements() method", testGetElements);
+            put("Test getName() method", testGetName);
+            put("Test delete() method", testDelete);
+        }};
+
+        System.out.println("============ Tests ============");
+        int testNo = 0;
+        int numberFailed = 0;
+        Map.Entry<Boolean, String> result;
+        for (String testName : testList.keySet()) {
+            System.out.println("Test " + ++testNo + ": " + testName);
+            result = testList.get(testName).runTest();
+            System.out.print("Result: " + (result.getKey() ? "PASS" : "FAIL"));
+            System.out.println(" " +
+                    (result.getValue() != null ? result.getValue() : ""));
+            System.out.println("-------------------------------------------");
+            if (!result.getKey()) {
+                numberFailed++;
+            }
+        }
+        System.out.println("End Results: " + (testList.size() - numberFailed) +
+                " Passed" + ", " + numberFailed + " Failed.");
+        if (numberFailed > 0) {
+            throw new RuntimeException(
+                    "One or more tests failed, see test output for details");
+        }
+    }
+
+    private static void dumpHexBytes(byte[] data) {
+        if (data != null) {
+            for (int i = 0; i < data.length; i++) {
+                if (i % 16 == 0 && i != 0) {
+                    System.out.print("\n");
+                }
+                System.out.print(String.format("%02X ", data[i]));
+            }
+            System.out.print("\n");
+        }
+    }
+
+    private static void debuglog(String message) {
+        if (DEBUG) {
+            System.out.println(message);
+        }
+    }
+
+    public static void verifyExtStructure(byte[] derData) throws IOException {
+        debuglog("verifyASN1Extension() received " + derData.length + " bytes");
+        DerInputStream dis = new DerInputStream(derData);
+
+        // The sequenceItems array should be either two or three elements
+        // long.  If three, then the criticality bit setting has been asserted.
+        DerValue[] sequenceItems = dis.getSequence(3);
+        debuglog("Found sequence containing " + sequenceItems.length +
+                " elements");
+        if (sequenceItems.length != 2 && sequenceItems.length != 3) {
+            throw new RuntimeException("Incorrect number of items found in " +
+                    "the SEQUENCE (Got " + sequenceItems.length +
+                    ", expected 2 or 3 items)");
+        }
+
+        int seqIndex = 0;
+        ObjectIdentifier extOid = sequenceItems[seqIndex++].getOID();
+        debuglog("Found OID: " + extOid.toString());
+        if (!extOid.equals((Object)PKIXExtensions.OCSPNonce_Id)) {
+            throw new RuntimeException("Incorrect OID (Got " +
+                    extOid.toString() + ", expected " +
+                    PKIXExtensions.OCSPNonce_Id.toString() + ")");
+        }
+
+        if (sequenceItems.length == 3) {
+            // Non-default criticality bit setting should be at index 1
+            boolean isCrit = sequenceItems[seqIndex++].getBoolean();
+            debuglog("Found BOOLEAN (critical): " + isCrit);
+        }
+
+        // The extnValue is an encapsulating OCTET STRING that contains the
+        // extension's value.  For the OCSP Nonce, that value itself is also
+        // an OCTET STRING consisting of the random bytes.
+        DerValue extnValue =
+                new DerValue(sequenceItems[seqIndex++].getOctetString());
+        byte[] nonceData = extnValue.getOctetString();
+        debuglog("Found " + nonceData.length + " bytes of nonce data");
+    }
+
+    public interface TestCase {
+        Map.Entry<Boolean, String> runTest();
+    }
+
+    public static final TestCase testCtorByLength = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+                Extension nonceByLen = new OCSPNonceExtension(32);
+
+                // Verify overall encoded extension structure
+                nonceByLen.encode(baos);
+                verifyExtStructure(baos.toByteArray());
+
+                // Verify the name, elements, and data conform to
+                // expected values for this specific object.
+                boolean crit = nonceByLen.isCritical();
+                String oid = nonceByLen.getId();
+                DerValue nonceData = new DerValue(nonceByLen.getValue());
+
+                if (crit) {
+                    message = "Extension incorrectly marked critical";
+                } else if (!oid.equals(OCSP_NONCE_OID)) {
+                    message = "Incorrect OID (Got " + oid + ", Expected " +
+                            OCSP_NONCE_OID + ")";
+                } else if (nonceData.getTag() != DerValue.tag_OctetString) {
+                    message = "Incorrect nonce data tag type (Got " +
+                            String.format("0x%02X", nonceData.getTag()) +
+                            ", Expected 0x04)";
+                } else if (nonceData.getOctetString().length != 32) {
+                    message = "Incorrect nonce byte length (Got " +
+                            nonceData.getOctetString().length +
+                            ", Expected 32)";
+                } else {
+                    pass = Boolean.TRUE;
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase testCtorSuperByDerValue = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+                Extension nonceByDer = new sun.security.x509.Extension(
+                        new DerValue(OCSP_NONCE_DER));
+
+                // Verify overall encoded extension structure
+                nonceByDer.encode(baos);
+                verifyExtStructure(baos.toByteArray());
+
+                // Verify the name, elements, and data conform to
+                // expected values for this specific object.
+                boolean crit = nonceByDer.isCritical();
+                String oid = nonceByDer.getId();
+                DerValue nonceData = new DerValue(nonceByDer.getValue());
+
+                if (!crit) {
+                    message = "Extension lacks expected criticality setting";
+                } else if (!oid.equals(OCSP_NONCE_OID)) {
+                    message = "Incorrect OID (Got " + oid + ", Expected " +
+                            OCSP_NONCE_OID + ")";
+                } else if (nonceData.getTag() != DerValue.tag_OctetString) {
+                    message = "Incorrect nonce data tag type (Got " +
+                            String.format("0x%02X", nonceData.getTag()) +
+                            ", Expected 0x04)";
+                } else if (nonceData.getOctetString().length != 48) {
+                    message = "Incorrect nonce byte length (Got " +
+                            nonceData.getOctetString().length +
+                            ", Expected 48)";
+                } else {
+                    pass = Boolean.TRUE;
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase testResetValue = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+                OCSPNonceExtension nonce = new OCSPNonceExtension(32);
+
+                // Reset the nonce data to reflect 16 bytes of DEADBEEF
+                nonce.set(OCSPNonceExtension.NONCE, (Object)DEADBEEF_16);
+
+                // Verify overall encoded extension content
+                nonce.encode(baos);
+                dumpHexBytes(OCSP_NONCE_DB16);
+                System.out.println();
+                dumpHexBytes(baos.toByteArray());
+
+                pass = Arrays.equals(baos.toByteArray(), OCSP_NONCE_DB16);
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase testSet = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                OCSPNonceExtension nonceByLen = new OCSPNonceExtension(32);
+
+                // Set the nonce data to 16 bytes of DEADBEEF
+                nonceByLen.set(ELEMENT_NONCE, DEADBEEF_16);
+                byte[] nonceData = (byte[])nonceByLen.get(ELEMENT_NONCE);
+                if (!Arrays.equals(nonceData, DEADBEEF_16)) {
+                    throw new RuntimeException("Retuned nonce data does not " +
+                            "match expected result");
+                }
+
+                // Now try to set a value using an object that is not a byte
+                // array
+                int[] INT_DB_16 = {
+                    0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF
+                };
+                try {
+                    nonceByLen.set(ELEMENT_NONCE, INT_DB_16);
+                    throw new RuntimeException("Accepted get() for " +
+                            "unsupported element name");
+                } catch (IOException ioe) { }     // Expected result
+
+                // And try setting a value using an unknown element name
+                try {
+                    nonceByLen.set("FOO", DEADBEEF_16);
+                    throw new RuntimeException("Accepted get() for " +
+                            "unsupported element name");
+                } catch (IOException ioe) { }     // Expected result
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+        public static final TestCase testGet = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                OCSPNonceExtension nonceByLen = new OCSPNonceExtension(32);
+
+                // Grab the nonce data by its correct element name
+                byte[] nonceData = (byte[])nonceByLen.get(ELEMENT_NONCE);
+                if (nonceData == null || nonceData.length != 32) {
+                    throw new RuntimeException("Unexpected return value from " +
+                            "get() method: either null or incorrect length");
+                }
+
+                // Now try to get any kind of data using an element name that
+                // doesn't exist for this extension.
+                try {
+                    nonceByLen.get("FOO");
+                    throw new RuntimeException("Accepted get() for " +
+                            "unsupported element name");
+                } catch (IOException ioe) { }     // Expected result
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase testGetElements = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                OCSPNonceExtension nonceByLen = new OCSPNonceExtension(32);
+
+                int elementCount = 0;
+                boolean foundElement = false;
+
+                // There should be exactly one element and its name should
+                // be "nonce"
+                for (Enumeration<String> elements = nonceByLen.getElements();
+                        elements.hasMoreElements(); elementCount++) {
+                    if (elements.nextElement().equals(ELEMENT_NONCE)) {
+                        foundElement = true;
+                    }
+                }
+
+                if (!foundElement || elementCount != 1) {
+                    throw new RuntimeException("Unexpected or missing " +
+                            "Enumeration element");
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase testGetName = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                OCSPNonceExtension nonceByLen = new OCSPNonceExtension(32);
+                pass = new Boolean(nonceByLen.getName().equals(EXT_NAME));
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase testDelete = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                OCSPNonceExtension nonceByLen = new OCSPNonceExtension(32);
+
+                // First verify that there's data to begin with
+                byte[] nonceData = (byte[])nonceByLen.get(ELEMENT_NONCE);
+                if (nonceData == null || nonceData.length != 32) {
+                    throw new RuntimeException("Unexpected return value from " +
+                            "get() method: either null or incorrect length");
+                }
+
+                // Attempt to delete using an element name that doesn't exist
+                // for this extension.
+                try {
+                    nonceByLen.delete("FOO");
+                    throw new RuntimeException("Accepted delete() for " +
+                            "unsupported element name");
+                } catch (IOException ioe) { }     // Expected result
+
+                // Now attempt to properly delete the extension data
+                nonceByLen.delete(ELEMENT_NONCE);
+                nonceData = (byte[])nonceByLen.get(ELEMENT_NONCE);
+                if (nonceData != null) {
+                    throw new RuntimeException("Unexpected non-null return");
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/provider/certpath/ResponderId/ResponderIdTests.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,419 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary OCSP Stapling for TLS (ResponderId tests)
+ */
+
+import java.io.*;
+import java.security.cert.*;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.util.AbstractMap;
+import java.util.Arrays;
+import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
+import javax.security.auth.x500.X500Principal;
+import sun.security.x509.KeyIdentifier;
+import sun.security.provider.certpath.ResponderId;
+
+/*
+ * NOTE: this test uses Sun private classes which are subject to change.
+ */
+public class ResponderIdTests {
+
+    private static final boolean debug = true;
+
+    // Source certificate created with the following command:
+    // keytool -genkeypair -alias test1 -keyalg rsa -keysize 2048 \
+    //   -validity 7300 -keystore test1.jks \
+    //   -dname "CN=SelfSignedResponder, OU=Validation Services, O=FakeCompany"
+    private static final String RESP_CERT_1 =
+        "-----BEGIN CERTIFICATE-----\n" +
+        "MIIDQzCCAiugAwIBAgIEXTqCCjANBgkqhkiG9w0BAQsFADBSMRQwEgYDVQQKEwtG\n" +
+        "YWtlQ29tcGFueTEcMBoGA1UECxMTVmFsaWRhdGlvbiBTZXJ2aWNlczEcMBoGA1UE\n" +
+        "AxMTU2VsZlNpZ25lZFJlc3BvbmRlcjAeFw0xNDA4MTcwNDM2MzBaFw0zNDA4MTIw\n" +
+        "NDM2MzBaMFIxFDASBgNVBAoTC0Zha2VDb21wYW55MRwwGgYDVQQLExNWYWxpZGF0\n" +
+        "aW9uIFNlcnZpY2VzMRwwGgYDVQQDExNTZWxmU2lnbmVkUmVzcG9uZGVyMIIBIjAN\n" +
+        "BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApt2Cmw2k9tviLxaxE8aWNuoosWKL\n" +
+        "h+K4mNcDGKSoiChsqRqeJEnOxijDZqyFwfkaXvpAduFqYjz+Lij2HumvAjHDTui6\n" +
+        "bGcbsndRDPjvVo1S7f1oWsg7oiA8Lzmjl452S7UNBsDX5Dt1e84Xxwi40B1J2y8D\n" +
+        "FRPfYRWRlC1Z4kzqkBBa7JhANS+W8KDstFZxL4AwWH/byNwB5dl2j04ohg/Ar54e\n" +
+        "mu08PIH3hmi0pAu5wn9ariA7UA5lFWRJzvgGXV5J+QVEFuvKmeJ/Q6tU5OBJGw98\n" +
+        "zjd7F5B0iE+rJHTNF1aGaQfIorz04onV2WjH2VZA18AaMwqlY2br1SBdTQIDAQAB\n" +
+        "oyEwHzAdBgNVHQ4EFgQUG09HasSTYaTIh/CxxV/rcJV1LvowDQYJKoZIhvcNAQEL\n" +
+        "BQADggEBAIcUomNpZxGkocIzzybLyeyC6vLF1k0/unuPAHZLDP3o2JTstPhLHOCg\n" +
+        "FYw1VG2i23pjwKK2x/o80tJAOmW6vowbAPnNmtNIYO3gB/ZGiKeORoGKBCRDNvFa\n" +
+        "6ZrWxwTzT3EpVwRe7ameES0uP8+S4q2P5LhwMIMw7vGHoOQJgkAh/NUiCli1qRnJ\n" +
+        "FYd6cHMJJK5gF2FqQ7tdbA26pS06bkIEvil2M5wyKKWOydOa/pr1LgMf9KxljJ8J\n" +
+        "XlAOO/mGZGkYmWnQaQuBIDyWunWYlhsyCXMa8AScgs0uUeQp19tO7R0f03q/JXoZ\n" +
+        "1At1gZiMS7SdQaRWP5q+FunAeFWjsFE=\n" +
+        "-----END CERTIFICATE-----";
+
+    private static final String RESP_CERT_1_SUBJ =
+        "CN=SelfSignedResponder, OU=Validation Services, O=FakeCompany";
+
+    private static X509Certificate cert = null;
+
+    // The expected DER-encoding for a byName ResponderId derived
+    // from RESP_CERT_1
+    private static final byte[] EXP_NAME_ID_BYTES = {
+        -95,   84,   48,   82,   49,   20,   48,   18,
+          6,    3,   85,    4,   10,   19,   11,   70,
+         97,  107,  101,   67,  111,  109,  112,   97,
+        110,  121,   49,   28,   48,   26,    6,    3,
+         85,    4,   11,   19,   19,   86,   97,  108,
+        105,  100,   97,  116,  105,  111,  110,   32,
+         83,  101,  114,  118,  105,   99,  101,  115,
+         49,   28,   48,   26,    6,    3,   85,    4,
+          3,   19,   19,   83,  101,  108,  102,   83,
+        105,  103,  110,  101,  100,   82,  101,  115,
+        112,  111,  110,  100,  101,  114
+    };
+
+    // The expected DER-encoding for a byKey ResponderId derived
+    // from RESP_CERT_1
+    private static final byte[] EXP_KEY_ID_BYTES = {
+         -94,   22,    4,   20,   27,   79,   71,  106,
+         -60, -109,   97,  -92,  -56, -121,  -16,  -79,
+         -59,   95,  -21,  112, -107,  117,   46,   -6
+    };
+
+    // The DER encoding of a byKey ResponderId, but using an
+    // incorrect explicit tagging (CONTEXT CONSTRUCTED 3)
+    private static final byte[] INV_EXPLICIT_TAG_KEY_ID = {
+         -93,   22,    4,   20,   27,   79,   71,  106,
+         -60, -109,   97,  -92,  -56, -121,  -16,  -79,
+         -59,   95,  -21,  112, -107,  117,   46,   -6
+    };
+
+    // These two ResponderId objects will have objects attached to them
+    // after the pos_CtorByName and pos_CtorByKeyId tests run.  Those
+    // two tests should always be the first two that run.
+    public static ResponderId respByName;
+    public static ResponderId respByKeyId;
+
+    public static void main(String[] args) throws Exception {
+        List<TestCase> testList = new ArrayList<>();
+
+        testList.add(pos_CtorByName);
+        testList.add(pos_CtorByKeyId);
+        testList.add(pos_CtorByEncoding);
+        testList.add(neg_CtorByEncoding);
+        testList.add(pos_Equality);
+        testList.add(pos_GetEncoded);
+        testList.add(pos_GetRespName);
+        testList.add(pos_GetRespKeyId);
+
+        // Load the certificate object we can use for subsequent tests
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
+        cert = (X509Certificate)cf.generateCertificate(
+                new ByteArrayInputStream(RESP_CERT_1.getBytes()));
+
+        System.out.println("============ Tests ============");
+        int testNo = 0;
+        int numberFailed = 0;
+        Map.Entry<Boolean, String> result;
+        for (TestCase test : testList) {
+            System.out.println("Test " + ++testNo + ": " + test.getName());
+            result = test.runTest();
+            System.out.print("Result: " + (result.getKey() ? "PASS" : "FAIL"));
+            System.out.println(" " +
+                    (result.getValue() != null ? result.getValue() : ""));
+            System.out.println("-------------------------------------------");
+            if (!result.getKey()) {
+                numberFailed++;
+            }
+        }
+        System.out.println("End Results: " + (testList.size() - numberFailed) +
+                " Passed" + ", " + numberFailed + " Failed.");
+        if (numberFailed > 0) {
+            throw new RuntimeException(
+                    "One or more tests failed, see test output for details");
+        }
+    }
+
+    private static void dumpHexBytes(byte[] data) {
+        if (data != null) {
+            for (int i = 0; i < data.length; i++) {
+                if (i % 16 == 0 && i != 0) {
+                    System.out.print("\n");
+                }
+                System.out.print(String.format("%02X ", data[i]));
+            }
+            System.out.print("\n");
+        }
+    }
+
+    public interface TestCase {
+        String getName();
+        Map.Entry<Boolean, String> runTest();
+    }
+
+    public static final TestCase pos_CtorByName = new TestCase() {
+        @Override
+        public String getName() {
+            return "CTOR Test (by-name)";
+        }
+
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                respByName = new ResponderId(cert.getSubjectX500Principal());
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase pos_CtorByKeyId = new TestCase() {
+        @Override
+        public String getName() {
+            return "CTOR Test (by-keyID)";
+        }
+
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                respByKeyId = new ResponderId(cert.getPublicKey());
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase pos_CtorByEncoding = new TestCase() {
+        @Override
+        public String getName() {
+            return "CTOR Test (encoded bytes)";
+        }
+
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                ResponderId ridByNameBytes = new ResponderId(EXP_NAME_ID_BYTES);
+                ResponderId ridByKeyIdBytes = new ResponderId(EXP_KEY_ID_BYTES);
+
+                if (!ridByNameBytes.equals(respByName)) {
+                    throw new RuntimeException(
+                            "Equals failed: respNameFromBytes vs. respByName");
+                } else if (!ridByKeyIdBytes.equals(respByKeyId)) {
+                    throw new RuntimeException(
+                            "Equals failed: respKeyFromBytes vs. respByKeyId");
+                }
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase neg_CtorByEncoding = new TestCase() {
+        @Override
+        public String getName() {
+            return "CTOR Test (by encoding, unknown explicit tag)";
+        }
+
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                ResponderId ridByKeyIdBytes =
+                        new ResponderId(INV_EXPLICIT_TAG_KEY_ID);
+                throw new RuntimeException("Expected IOException not thrown");
+            } catch (IOException ioe) {
+                // Make sure it's the IOException we're looking for
+                if (ioe.getMessage().contains("Invalid ResponderId content")) {
+                    pass = Boolean.TRUE;
+                } else {
+                    ioe.printStackTrace(System.out);
+                    message = ioe.getClass().getName();
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+
+    public static final TestCase pos_Equality = new TestCase() {
+        @Override
+        public String getName() {
+            return "Simple Equality Test";
+        }
+
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+
+            try {
+                // byName ResponderId equality test
+                ResponderId compName =
+                    new ResponderId(new X500Principal(RESP_CERT_1_SUBJ));
+                if (!respByName.equals(compName)) {
+                    message = "ResponderId mismatch in byName comparison";
+                } else if (respByKeyId.equals(compName)) {
+                    message = "Invalid ResponderId match in byKeyId comparison";
+                } else {
+                    pass = Boolean.TRUE;
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase pos_GetEncoded = new TestCase() {
+        @Override
+        public String getName() {
+            return "Get Encoded Value";
+        }
+
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+
+            try {
+                // Pull out byName and byKey encodings, they should match
+                // the expected values
+                if (!Arrays.equals(respByName.getEncoded(), EXP_NAME_ID_BYTES)) {
+                    message = "ResponderId byName encoding did not " +
+                            "match expected value";
+                } else if (!Arrays.equals(respByKeyId.getEncoded(), EXP_KEY_ID_BYTES)) {
+                    message = "ResponderId byKeyId encoding did not " +
+                            "match expected value";
+                } else {
+                    pass = Boolean.TRUE;
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase pos_GetRespName = new TestCase() {
+        @Override
+        public String getName() {
+            return "Get Underlying Responder Name";
+        }
+
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+
+            try {
+                // Test methods for pulling out the underlying
+                // X500Principal object
+                X500Principal testPrincipal =
+                        new X500Principal(RESP_CERT_1_SUBJ);
+                if (!respByName.getResponderName().equals(testPrincipal)) {
+                    message = "ResponderId Name did not match expected value";
+                } else if (respByKeyId.getResponderName() != null) {
+                    message = "Non-null responder name returned from " +
+                            "ResponderId constructed byKey";
+                } else {
+                    pass = Boolean.TRUE;
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase pos_GetRespKeyId = new TestCase() {
+        @Override
+        public String getName() {
+            return "Get Underlying Responder Key ID";
+        }
+
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+
+            try {
+                // Test methods for pulling out the underlying
+                // KeyIdentifier object.  Note: There is a minute chance that
+                // an RSA public key, once hashed into a key ID might collide
+                // with the one extracted from the certificate used to create
+                // respByKeyId.  This is so unlikely to happen it is considered
+                // virtually impossible.
+                KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
+                kpg.initialize(2048);
+                KeyPair rsaKey = kpg.generateKeyPair();
+                KeyIdentifier testKeyId = new KeyIdentifier(rsaKey.getPublic());
+
+                if (respByKeyId.getKeyIdentifier().equals(testKeyId)) {
+                    message = "Unexpected match in ResponderId Key ID";
+                } else if (respByName.getKeyIdentifier() != null) {
+                    message = "Non-null key ID returned from " +
+                            "ResponderId constructed byName";
+                } else {
+                    pass = Boolean.TRUE;
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+}
--- a/jdk/test/sun/security/ssl/ExtensionType/OptimalListSize.java	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/sun/security/ssl/ExtensionType/OptimalListSize.java	Mon Aug 10 14:05:37 2015 +0300
@@ -36,6 +36,6 @@
     public static void main(String[] args) throws Throwable {
         OptimalCapacity.ofArrayList(
                 Class.forName("sun.security.ssl.ExtensionType"),
-                "knownExtensions", 13);
+                "knownExtensions", 14);
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/StatusStapling/BogusStatusRequest.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+
+final class BogusStatusRequest implements StatusRequest {
+    BogusStatusRequest() { }
+
+    @Override
+    public int length() { return 0; }
+
+    @Override
+    public void send(HandshakeOutStream s) throws IOException { }
+
+    @Override
+    public String toString() {
+        return "BogusStatusRequest";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/StatusStapling/CertStatusReqExtensionTests.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,346 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary OCSP Stapling for TLS (CertStatusReqExtension tests)
+ * @build CertStatusReqExtensionTests BogusStatusRequest TestCase TestUtils
+ * @run main/othervm sun.security.ssl.CertStatusReqExtensionTests
+ */
+
+import java.io.IOException;
+import java.util.*;
+import java.nio.ByteBuffer;
+
+/*
+ * Checks that the hash value for a certificate's issuer name is generated
+ * correctly. Requires any certificate that is not self-signed.
+ *
+ * NOTE: this test uses Sun private classes which are subject to change.
+ */
+public class CertStatusReqExtensionTests {
+
+    private static final boolean debug = false;
+
+    // Default status_request extension (type = ocsp, OCSPStatusRequest
+    // with no responder IDs or extensions
+    private static final byte[] CSRE_DEF_OSR = {1, 0, 0, 0, 0};
+
+    // A status_request extension using a user-defined type (0xFF) and
+    // an underlying no-Responder ID/no-extension OCSPStatusRequest
+    private static final byte[] CSRE_TYPE_FF = {-1, 0, 0, 0, 0};
+
+    // A CertStatusReqExtension with 5 ResponderIds and 1 Extension
+    private static final byte[] CSRE_REQ_RID_EXTS = {
+           1,    0,  -13,    0,   59,  -95,   57,   48,
+          55,   49,   16,   48,   14,    6,    3,   85,
+           4,   10,   19,    7,   83,  111,  109,  101,
+          73,  110,   99,   49,   16,   48,   14,    6,
+           3,   85,    4,   11,   19,    7,   83,  111,
+         109,  101,   80,   75,   73,   49,   17,   48,
+          15,    6,    3,   85,    4,    3,   19,    8,
+          83,  111,  109,  101,   79,   67,   83,   80,
+           0,   68,  -95,   66,   48,   64,   49,   13,
+          48,   11,    6,    3,   85,    4,   10,   19,
+           4,   79,  104,   77,  121,   49,   14,   48,
+          12,    6,    3,   85,    4,   11,   19,    5,
+          66,  101,   97,  114,  115,   49,   15,   48,
+          13,    6,    3,   85,    4,   11,   19,    6,
+          84,  105,  103,  101,  114,  115,   49,   14,
+          48,   12,    6,    3,   85,    4,    3,   19,
+           5,   76,  105,  111,  110,  115,    0,   58,
+         -95,   56,   48,   54,   49,   16,   48,   14,
+           6,    3,   85,    4,   10,   19,    7,   67,
+         111,  109,  112,   97,  110,  121,   49,   13,
+          48,   11,    6,    3,   85,    4,   11,   19,
+           4,   87,  101,  115,  116,   49,   19,   48,
+          17,    6,    3,   85,    4,    3,   19,   10,
+          82,  101,  115,  112,  111,  110,  100,  101,
+         114,   49,    0,   24,  -94,   22,    4,   20,
+         -67,  -36,  114,  121,   92,  -79,  116,   -1,
+         102, -107,    7,  -21,   18, -113,   64,   76,
+          96,   -7,  -66,  -63,    0,   24,  -94,   22,
+           4,   20,  -51,  -69,  107,  -82,  -39,  -87,
+          45,   25,   41,   28,  -76,  -68,  -11, -110,
+         -94,  -97,   62,   47,   58, -125,    0,   51,
+          48,   49,   48,   47,    6,    9,   43,    6,
+           1,    5,    5,    7,   48,    1,    2,    4,
+          34,    4,   32,  -26,  -81, -120,  -61, -127,
+         -79,    0,  -39,  -54,   49,    3,  -51,  -57,
+         -85,   19, -126,   94,   -2,   21,   26,   98,
+           6,  105,  -35,  -37,  -29,  -73,  101,   53,
+          44,   15,  -19
+    };
+
+    public static void main(String[] args) throws Exception {
+        Map<String, TestCase> testList =
+                new LinkedHashMap<String, TestCase>() {{
+            put("CTOR (default)", testCtorDefault);
+            put("CTOR (int, StatusRequest)", testCtorStatReqs);
+            put("CTOR (HandshakeInStream, length, getReqType, getRequest)",
+                    testCtorInStream);
+        }};
+
+        TestUtils.runTests(testList);
+    }
+
+    public static final TestCase testCtorDefault = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                CertStatusReqExtension csreDef = new CertStatusReqExtension();
+                HandshakeOutStream hsout =
+                        new HandshakeOutStream(null);
+                csreDef.send(hsout);
+                TestUtils.valueCheck(wrapExtData(null), hsout.toByteArray());
+
+                // The length should be 4 (2 bytes for the type, 2 for the
+                // encoding of zero-length
+                if (csreDef.length() != 4) {
+                    throw new RuntimeException("Incorrect length from " +
+                            "default object.  Expected 4, got " +
+                            csreDef.length());
+                }
+
+                // Since there's no data, there are no status_type or request
+                // data fields defined.  Both should return null in this case
+                if (csreDef.getType() != null) {
+                    throw new RuntimeException("Default CSRE returned " +
+                            "non-null status_type");
+                } else if (csreDef.getRequest() != null) {
+                    throw new RuntimeException("Default CSRE returned " +
+                            "non-null request object");
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase testCtorStatReqs = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                HandshakeOutStream hsout =
+                        new HandshakeOutStream(null);
+                StatusRequest basicStatReq = new OCSPStatusRequest();
+
+                // Create an extension using a default-style OCSPStatusRequest
+                // (no responder IDs, no extensions).
+                CertStatusReqExtension csre1 = new CertStatusReqExtension(
+                        StatusRequestType.OCSP, basicStatReq);
+                csre1.send(hsout);
+                TestUtils.valueCheck(wrapExtData(CSRE_DEF_OSR),
+                        hsout.toByteArray());
+                hsout.reset();
+
+                // Create the extension using a StatusRequestType not already
+                // instantiated as a static StatusRequestType
+                // (e.g. OCSP/OCSP_MULTI)
+                CertStatusReqExtension csre2 =
+                        new CertStatusReqExtension(StatusRequestType.get(-1),
+                                basicStatReq);
+                csre2.send(hsout);
+                TestUtils.valueCheck(wrapExtData(CSRE_TYPE_FF),
+                        hsout.toByteArray());
+
+                // Create the extension using a StatusRequest that
+                // does not match the status_type field
+                // This should throw an IllegalArgumentException
+                try {
+                    CertStatusReqExtension csreBadRequest =
+                            new CertStatusReqExtension(StatusRequestType.OCSP,
+                                    new BogusStatusRequest());
+                    throw new RuntimeException("Constructor accepted a " +
+                            "StatusRequest that is inconsistent with " +
+                            "the status_type");
+                } catch (IllegalArgumentException iae) { }
+
+                // We don't allow a null value for the StatusRequestType
+                // parameter in this constructor.
+                try {
+                    CertStatusReqExtension csreBadRequest =
+                            new CertStatusReqExtension(null, basicStatReq);
+                    throw new RuntimeException("Constructor accepted a " +
+                            "null StatusRequestType");
+                } catch (NullPointerException npe) { }
+
+                // We also don't allow a null value for the StatusRequest
+                // parameter in this constructor.
+                try {
+                    CertStatusReqExtension csreBadRequest =
+                            new CertStatusReqExtension(StatusRequestType.OCSP,
+                                    null);
+                    throw new RuntimeException("Constructor accepted a " +
+                            "null StatusRequest");
+                } catch (NullPointerException npe) { }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test the constructor that builds the ob ject using data from
+    // a HandshakeInStream
+    // This also tests the length, getReqType and getRequest methods
+    public static final TestCase testCtorInStream = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            OCSPStatusRequest osr;
+
+            try {
+                // To simulate the extension coming in a ServerHello, the
+                // type and length would already be read by HelloExtensions
+                // and there is no extension data
+                HandshakeInStream hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(new byte[0]));
+                CertStatusReqExtension csre =
+                        new CertStatusReqExtension(hsis, hsis.available());
+                // Verify length/type/request
+                if (csre.length() != 4) {
+                     throw new RuntimeException("Invalid length: received " +
+                            csre.length() + ", expected 4");
+                } else if (csre.getType() != null) {
+                    throw new RuntimeException("Non-null type from default " +
+                            "extension");
+                } else if (csre.getRequest() != null) {
+                    throw new RuntimeException("Non-null request from default " +
+                            "extension");
+                }
+
+                // Try the an extension with a default OCSPStatusRequest
+                hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(CSRE_DEF_OSR));
+                csre = new CertStatusReqExtension(hsis, hsis.available());
+                if (csre.length() != (CSRE_DEF_OSR.length + 4)) {
+                    throw new RuntimeException("Invalid length: received " +
+                            csre.length() + ", expected " +
+                            CSRE_DEF_OSR.length + 4);
+                } else if (!csre.getType().equals(StatusRequestType.OCSP)) {
+                    throw new RuntimeException("Unknown status_type: " +
+                            String.format("0x%02X", csre.getType().id));
+                } else {
+                    osr = (OCSPStatusRequest)csre.getRequest();
+                    if (!osr.getResponderIds().isEmpty() ||
+                            !osr.getExtensions().isEmpty()) {
+                        throw new RuntimeException("Non-default " +
+                                "OCSPStatusRequest found in extension");
+                    }
+                }
+
+                // Try with a non-default extension
+                hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(CSRE_REQ_RID_EXTS));
+                csre = new CertStatusReqExtension(hsis, hsis.available());
+                if (csre.length() != (CSRE_REQ_RID_EXTS.length + 4)) {
+                    throw new RuntimeException("Invalid length: received " +
+                            csre.length() + ", expected " +
+                            CSRE_REQ_RID_EXTS.length + 4);
+                } else if (!(csre.getType().equals(StatusRequestType.OCSP))) {
+                    throw new RuntimeException("Unknown status_type: " +
+                            String.format("0x%02X", csre.getType().id));
+                } else {
+                    osr = (OCSPStatusRequest)csre.getRequest();
+                    if (osr.getResponderIds().size() != 5 ||
+                            osr.getExtensions().size() != 1) {
+                        throw new RuntimeException("Incorrect number of " +
+                                "ResponderIds or Extensions found in " +
+                                "OCSPStatusRequest");
+                    }
+                }
+
+                // Create a CSRE that asserts status_request and has the
+                // proper length, but really is a bunch of random junk inside
+                // In this case, it will create an UnknownStatusRequest to
+                // handle the unparseable data.
+                byte[] junkData = new byte[48];
+                Random r = new Random(System.currentTimeMillis());
+                r.nextBytes(junkData);
+                junkData[0] = 7;        // Ensure it isn't a valid status_type
+                hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(junkData));
+                csre = new CertStatusReqExtension(hsis, hsis.available());
+                StatusRequest sr = csre.getRequest();
+                if (!(sr instanceof UnknownStatusRequest)) {
+                    throw new RuntimeException("Expected returned status " +
+                            "request to be of type UnknownStatusRequest but " +
+                            "received " + sr.getClass().getName());
+                } else if (csre.length() != (junkData.length + 4)) {
+                    throw new RuntimeException("Invalid length: received " +
+                            csre.length() + ", expected " +
+                            junkData.length + 4);
+                }
+
+                // Set the leading byte to 1 (OCSP type) and run again
+                // It should pass the argument check and fail trying to parse
+                // the underlying StatusRequest.
+                junkData[0] = (byte)StatusRequestType.OCSP.id;
+                hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(junkData));
+                try {
+                    csre = new CertStatusReqExtension(hsis, hsis.available());
+                    throw new RuntimeException("Expected CTOR exception did " +
+                            "not occur");
+                } catch (IOException ioe) { }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Take CSRE extension data and add extension type and length decorations
+    private static byte[] wrapExtData(byte[] extData) {
+        int bufferLen = (extData != null ? extData.length : 0) + 4;
+        ByteBuffer bb = ByteBuffer.allocate(bufferLen);
+        bb.putShort((short)ExtensionType.EXT_STATUS_REQUEST.id);
+        bb.putShort((short)(extData != null ? extData.length: 0));
+        if (extData != null) {
+            bb.put(extData);
+        }
+        return bb.array();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/StatusStapling/CertStatusReqItemV2Tests.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,463 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary OCSP Stapling for TLS (CertStatusReqItemv2 tests)
+ * @build CertStatusReqItemV2Tests BogusStatusRequest TestCase TestUtils
+ * @run main/othervm sun.security.ssl.CertStatusReqItemV2Tests
+ */
+
+import java.security.cert.*;
+import java.util.*;
+import java.nio.ByteBuffer;
+import javax.net.ssl.SSLException;
+import javax.security.auth.x500.X500Principal;
+import sun.security.provider.certpath.ResponderId;
+import sun.security.provider.certpath.OCSPNonceExtension;
+
+/*
+ * Checks that the hash value for a certificate's issuer name is generated
+ * correctly. Requires any certificate that is not self-signed.
+ *
+ * NOTE: this test uses Sun private classes which are subject to change.
+ */
+public class CertStatusReqItemV2Tests {
+
+    private static final boolean debug = false;
+
+    private static final byte[] DEF_CSRIV2_OCSP_MULTI_BYTES = {
+           2,    0,    4,    0,    0,    0,    0
+    };
+
+    private static final byte[] DEF_CSRIV2_OCSP_BYTES = {
+           1,    0,    4,    0,    0,    0,    0
+    };
+
+    // This is a CSRIV2 (ocsp_multi) that has a single
+    // responder ID and no extensions.
+    private static final byte[] CSRIV2_1RID = {
+            2,    0,   32,     0,   28,    0,   26,  -95,
+           24,   48,   22,    49,   20,   48,   18,    6,
+            3,   85,    4,     3,   19,   11,   79,   67,
+           83,   80,   32,    83,  105,  103,  110,  101,
+          114,    0 ,   0
+    };
+
+    // This is a CSRIV2 (ocsp_multi) that has a single
+    // responder ID and no extensions.  The request_length
+    // field is too short in this case.
+    private static final byte[] CSRIV2_LENGTH_TOO_SHORT = {
+            2,    0,   27,     0,   28,    0,   26,  -95,
+           24,   48,   22,    49,   20,   48,   18,    6,
+            3,   85,    4,     3,   19,   11,   79,   67,
+           83,   80,   32,    83,  105,  103,  110,  101,
+          114,    0 ,   0
+    };
+
+    // This is a CSRIV2 (ocsp_multi) that has a single
+    // responder ID and no extensions.  The request_length
+    // field is too long in this case.
+    private static final byte[] CSRIV2_LENGTH_TOO_LONG = {
+            2,    0,   54,     0,   28,    0,   26,  -95,
+           24,   48,   22,    49,   20,   48,   18,    6,
+            3,   85,    4,     3,   19,   11,   79,   67,
+           83,   80,   32,    83,  105,  103,  110,  101,
+          114,    0 ,   0
+    };
+
+    // A CSRIV2 (ocsp) with one Responder ID (byName: CN=OCSP Signer)
+    // and a nonce extension (32 bytes).
+    private static final byte[] CSRIV2_OCSP_1RID_1EXT = {
+            1,    0,   83,    0,   28,    0,   26,  -95,
+           24,   48,   22,   49,   20,   48,   18,    6,
+            3,   85,    4,    3,   19,   11,   79,   67,
+           83,   80,   32,   83,  105,  103,  110,  101,
+          114,    0,   51,   48,   49,   48,   47,    6,
+            9,   43,    6,    1,    5,    5,    7,   48,
+            1,    2,    4,   34,    4,   32,  -34,  -83,
+          -66,  -17,  -34,  -83,  -66,  -17,  -34,  -83,
+          -66,  -17,  -34,  -83,  -66,  -17,  -34,  -83,
+          -66,  -17,  -34,  -83,  -66,  -17,  -34,  -83,
+          -66,  -17,  -34,  -83,  -66,  -17
+    };
+
+    public static void main(String[] args) throws Exception {
+        Map<String, TestCase> testList =
+                new LinkedHashMap<String, TestCase>() {{
+            put("CTOR (Default)", testCtorTypeStatReq);
+            put("CTOR (Byte array)", testCtorByteArray);
+            put("CTOR (invalid lengths)", testCtorInvalidLengths);
+        }};
+
+        TestUtils.runTests(testList);
+    }
+
+    public static final TestCase testCtorTypeStatReq = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                // Attempt to create CSRIv2 objects using null pointers
+                // for either parameter.  In either case NPE should be thrown
+                CertStatusReqItemV2 csriNull;
+                try {
+                    csriNull = new CertStatusReqItemV2(null,
+                            new OCSPStatusRequest());
+                    throw new RuntimeException("Did not catch expected NPE " +
+                            "for null status_type parameter");
+                } catch (NullPointerException npe) { }
+
+                try {
+                    csriNull = new CertStatusReqItemV2(StatusRequestType.OCSP,
+                            null);
+                    throw new RuntimeException("Did not catch expected NPE " +
+                            "for null StatusRequest parameter");
+                } catch (NullPointerException npe) { }
+
+                // Create an "ocsp_multi" type request using a default
+                // (no Responder IDs, no Extensions) OCSPStatusRequest
+                CertStatusReqItemV2 csriMulti =
+                        new CertStatusReqItemV2(StatusRequestType.OCSP_MULTI,
+                                new OCSPStatusRequest());
+                HandshakeOutStream hsout = new HandshakeOutStream(null);
+                csriMulti.send(hsout);
+                TestUtils.valueCheck(DEF_CSRIV2_OCSP_MULTI_BYTES,
+                        hsout.toByteArray());
+                hsout.reset();
+
+                // Create an "ocsp" type request using a default
+                // (no Responder IDs, no Extensions) OCSPStatusRequest
+                CertStatusReqItemV2 csriSingle =
+                        new CertStatusReqItemV2(StatusRequestType.OCSP,
+                                new OCSPStatusRequest(new LinkedList<>(),
+                                        new LinkedList<>()));
+                csriSingle.send(hsout);
+                TestUtils.valueCheck(DEF_CSRIV2_OCSP_BYTES,
+                        hsout.toByteArray());
+
+                // Create the CertStatusRequestItemV2 with a user-defined
+                // StatusRequestType value
+                CertStatusReqItemV2 csriNine =
+                        new CertStatusReqItemV2(StatusRequestType.get(9),
+                                new OCSPStatusRequest(null, null));
+                if (csriNine.getType().id != 9) {
+                    throw new RuntimeException("Expected status_type = 9, " +
+                            "got " + csriNine.getType().id);
+                } else {
+                    StatusRequest sr = csriNine.getRequest();
+                    if (!(sr instanceof OCSPStatusRequest)) {
+                        throw new RuntimeException("Expected " +
+                                "OCSPStatusRequest, got " +
+                                sr.getClass().getName());
+                    }
+                }
+
+                // Create the CertStatusRequestItemV2 with a StatusRequest
+                // that does not match the status_type argument.
+                // We expect IllegalArgumentException in this case.
+                try {
+                    CertStatusReqItemV2 csriBadSR = new CertStatusReqItemV2(
+                            StatusRequestType.OCSP_MULTI,
+                            new BogusStatusRequest());
+                    throw new RuntimeException("Constructor accepted a " +
+                            "StatusRequest that is inconsistent with " +
+                            "the status_type");
+                } catch (IllegalArgumentException iae) {
+                    // The expected result...nothing to do here
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test the constructor form that takes the data from a byte array
+    public static final TestCase testCtorByteArray = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                StatusRequestType sType;
+                StatusRequest sReq;
+                ResponderId checkRid =
+                        new ResponderId(new X500Principal("CN=OCSP Signer"));
+                Extension checkExt = new OCSPNonceExtension(32);
+
+                CertStatusReqItemV2 csriv =
+                        new CertStatusReqItemV2(CSRIV2_OCSP_1RID_1EXT);
+                sType = csriv.getType();
+                if (sType != StatusRequestType.OCSP) {
+                    throw new RuntimeException("Unexpected StatusRequestType " +
+                            sType.getClass().getName());
+                }
+
+                sReq = csriv.getRequest();
+                if (sReq instanceof OCSPStatusRequest) {
+                    OCSPStatusRequest osr = (OCSPStatusRequest)sReq;
+                    List<ResponderId> ridList = osr.getResponderIds();
+                    List<Extension> extList = osr.getExtensions();
+
+                    if (ridList.size() != 1 || !ridList.contains(checkRid)) {
+                        throw new RuntimeException("Responder list mismatch");
+                    } else if (extList.size() !=  1 ||
+                            !extList.get(0).getId().equals(checkExt.getId())) {
+                        throw new RuntimeException("Extension list mismatch");
+                    }
+                } else {
+                    throw new RuntimeException("Expected OCSPStatusRequest " +
+                            "from decoded bytes, got " +
+                            sReq.getClass().getName());
+                }
+
+                // Create a CSRIV2 out of random data.  A non-OCSP/OCSP_MULTI
+                // type will be forcibly set and the outer length field will
+                // be correct.
+                // The constructor should create a StatusRequestType object
+                // and an UnknownStatusRequest object consisting of the
+                // data segment.
+                byte[] junkData = new byte[48];
+                Random r = new Random(System.currentTimeMillis());
+                r.nextBytes(junkData);
+                junkData[0] = 7;        // status_type = 7
+                junkData[1] = 0;
+                junkData[2] = 45;       // request_length = 45
+                csriv = new CertStatusReqItemV2(junkData);
+
+                sType = csriv.getType();
+                sReq = csriv.getRequest();
+                if (sType.id != junkData[0]) {
+                    throw new RuntimeException("StatusRequestType mismatch: " +
+                            "expected 7, got " + sType.id);
+                }
+                if (sReq instanceof UnknownStatusRequest) {
+                    // Verify the underlying StatusRequest bytes have been
+                    // preserved correctly.
+                    HandshakeOutStream hsout = new HandshakeOutStream(null);
+                    sReq.send(hsout);
+                    byte[] srDataOut = hsout.toByteArray();
+                    TestUtils.valueCheck(srDataOut, junkData, 0, 3,
+                            srDataOut.length);
+                } else {
+                    throw new RuntimeException("StatusRequest mismatch: " +
+                            "expected UnknownStatusRequest, got " +
+                            sReq.getClass().getName());
+                }
+
+                // Test the parsing of the default OCSP/OCSP_MULTI extensions
+                // and make sure the underlying StatusRequestType and
+                // StatusRequest objects are correct.
+                csriv = new CertStatusReqItemV2(DEF_CSRIV2_OCSP_MULTI_BYTES);
+                sType = csriv.getType();
+                sReq = csriv.getRequest();
+                if (sType != StatusRequestType.OCSP_MULTI) {
+                    throw new RuntimeException("StatusRequestType mismatch: " +
+                            "expected OCSP_MULTI (2), got " + sType.id);
+                }
+                if (!(sReq instanceof OCSPStatusRequest)) {
+                    throw new RuntimeException("StatusRequest mismatch: " +
+                            "expected OCSPStatusRequest, got " +
+                            sReq.getClass().getName());
+                }
+
+                csriv = new CertStatusReqItemV2(DEF_CSRIV2_OCSP_BYTES);
+                sType = csriv.getType();
+                sReq = csriv.getRequest();
+                if (sType != StatusRequestType.OCSP) {
+                    throw new RuntimeException("StatusRequestType mismatch: " +
+                            "expected OCSP (1), got " + sType.id);
+                }
+                if (!(sReq instanceof OCSPStatusRequest)) {
+                    throw new RuntimeException("StatusRequest mismatch: " +
+                            "expected OCSPStatusRequest, got " +
+                            sReq.getClass().getName());
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase testCtorInvalidLengths = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                try {
+                    CertStatusReqItemV2 csriTooShort =
+                            new CertStatusReqItemV2(CSRIV2_LENGTH_TOO_SHORT);
+                    throw new RuntimeException("Expected exception not thrown");
+                } catch (SSLException ssle) { }
+
+                try {
+                    CertStatusReqItemV2 csriTooLong =
+                            new CertStatusReqItemV2(CSRIV2_LENGTH_TOO_LONG);
+                    throw new RuntimeException("Expected exception not thrown");
+                } catch (SSLException ssle) { }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test the constructor form that takes the data from HandshakeInputStream
+    public static final TestCase testCtorInputStream = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                StatusRequestType sType;
+                StatusRequest sReq;
+                ResponderId checkRid =
+                        new ResponderId(new X500Principal("CN=OCSP Signer"));
+                Extension checkExt = new OCSPNonceExtension(32);
+
+                HandshakeInStream hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(CSRIV2_OCSP_1RID_1EXT));
+                CertStatusReqItemV2 csriv = new CertStatusReqItemV2(hsis);
+                sType = csriv.getType();
+                if (sType != StatusRequestType.OCSP) {
+                    throw new RuntimeException("Unexpected StatusRequestType " +
+                            sType.getClass().getName());
+                }
+
+                sReq = csriv.getRequest();
+                if (sReq instanceof OCSPStatusRequest) {
+                    OCSPStatusRequest osr = (OCSPStatusRequest)sReq;
+                    List<ResponderId> ridList = osr.getResponderIds();
+                    List<Extension> extList = osr.getExtensions();
+
+                    if (ridList.size() != 1 || !ridList.contains(checkRid)) {
+                        throw new RuntimeException("Responder list mismatch");
+                    } else if (extList.size() !=  1 ||
+                            !extList.get(0).getId().equals(checkExt.getId())) {
+                        throw new RuntimeException("Extension list mismatch");
+                    }
+                } else {
+                    throw new RuntimeException("Expected OCSPStatusRequest " +
+                            "from decoded bytes, got " +
+                            sReq.getClass().getName());
+                }
+
+                // Create a CSRIV2 out of random data.  A non-OCSP/OCSP_MULTI
+                // type will be forcibly set and the outer length field will
+                // be correct.
+                // The constructor should create a StatusRequestType object
+                // and an UnknownStatusRequest object consisting of the
+                // data segment.
+                byte[] junkData = new byte[48];
+                Random r = new Random(System.currentTimeMillis());
+                r.nextBytes(junkData);
+                junkData[0] = 7;        // status_type = 7
+                junkData[1] = 0;
+                junkData[2] = 45;       // request_length = 45
+                hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(junkData));
+                csriv = new CertStatusReqItemV2(hsis);
+
+                sType = csriv.getType();
+                sReq = csriv.getRequest();
+                if (sType.id != junkData[0]) {
+                    throw new RuntimeException("StatusRequestType mismatch: " +
+                            "expected 7, got " + sType.id);
+                }
+                if (sReq instanceof UnknownStatusRequest) {
+                    // Verify the underlying StatusRequest bytes have been
+                    // preserved correctly.
+                    HandshakeOutStream hsout = new HandshakeOutStream(null);
+                    sReq.send(hsout);
+                    byte[] srDataOut = hsout.toByteArray();
+                    TestUtils.valueCheck(srDataOut, junkData, 0, 3,
+                            srDataOut.length);
+                } else {
+                    throw new RuntimeException("StatusRequest mismatch: " +
+                            "expected UnknownStatusRequest, got " +
+                            sReq.getClass().getName());
+                }
+
+                // Test the parsing of the default OCSP/OCSP_MULTI extensions
+                // and make sure the underlying StatusRequestType and
+                // StatusRequest objects are correct.
+                hsis = new HandshakeInStream();
+                hsis.incomingRecord(
+                        ByteBuffer.wrap(DEF_CSRIV2_OCSP_MULTI_BYTES));
+                csriv = new CertStatusReqItemV2(hsis);
+                sType = csriv.getType();
+                sReq = csriv.getRequest();
+                if (sType != StatusRequestType.OCSP_MULTI) {
+                    throw new RuntimeException("StatusRequestType mismatch: " +
+                            "expected OCSP_MULTI (2), got " + sType.id);
+                }
+                if (!(sReq instanceof OCSPStatusRequest)) {
+                    throw new RuntimeException("StatusRequest mismatch: " +
+                            "expected OCSPStatusRequest, got " +
+                            sReq.getClass().getName());
+                }
+
+                hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(DEF_CSRIV2_OCSP_BYTES));
+                csriv = new CertStatusReqItemV2(hsis);
+                sType = csriv.getType();
+                sReq = csriv.getRequest();
+                if (sType != StatusRequestType.OCSP) {
+                    throw new RuntimeException("StatusRequestType mismatch: " +
+                            "expected OCSP (1), got " + sType.id);
+                }
+                if (!(sReq instanceof OCSPStatusRequest)) {
+                    throw new RuntimeException("StatusRequest mismatch: " +
+                            "expected OCSPStatusRequest, got " +
+                            sReq.getClass().getName());
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/StatusStapling/CertStatusReqListV2ExtensionTests.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,413 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary OCSP Stapling for TLS (CertStatusReqListV2Extension tests)
+ * @build CertStatusReqListV2ExtensionTests TestCase TestUtils
+ * @run main/othervm sun.security.ssl.CertStatusReqListV2ExtensionTests
+ */
+
+import java.io.IOException;
+import java.util.*;
+import java.nio.ByteBuffer;
+import javax.net.ssl.*;
+
+/*
+ * Checks that the hash value for a certificate's issuer name is generated
+ * correctly. Requires any certificate that is not self-signed.
+ *
+ * NOTE: this test uses Sun private classes which are subject to change.
+ */
+public class CertStatusReqListV2ExtensionTests {
+
+    private static final boolean debug = false;
+
+    // Default status_request_v2 extension with two items
+    // 1. Type = ocsp_multi, OCSPStatusRequest is default
+    // 2. Type = ocsp, OCSPStatusRequest is default
+    private static final byte[] CSRLV2_DEF = {
+           0,   14,    2,    0,    4,    0,    0,    0,
+           0,    1,    0,    4,    0,    0,    0,    0
+    };
+
+    // A status_request_v2 where the item list length is
+    // longer than the provided data
+    private static final byte[] CSRLV2_LEN_TOO_LONG = {
+           0,   18,    2,    0,    4,    0,    0,    0,
+           0,    1,    0,    4,    0,    0,    0,    0
+    };
+
+    // A status_request_v2 where the item list length is
+    // shorter than the provided data
+    private static final byte[] CSRLV2_LEN_TOO_SHORT = {
+           0,   11,    2,    0,    4,    0,    0,    0,
+           0,    1,    0,    4,    0,    0,    0,    0
+    };
+
+    // A status_request_v2 extension with a zero-length
+    // certificate_status_req_list (not allowed by the spec)
+    private static final byte[] CSRLV2_INVALID_ZEROLEN = {0, 0};
+
+    // A status_request_v2 extension with two items (ocsp_multi and ocsp)
+    // using OCSPStatusRequests with 5 ResponderIds and 1 Extension each.
+    private static final byte[] CSRLV2_TWO_NON_DEF_ITEMS = {
+            2,   90,    2,    1,   42,    0,  -13,    0,
+           59,  -95,   57,   48,   55,   49,   16,   48,
+           14,    6,    3,   85,    4,   10,   19,    7,
+           83,  111,  109,  101,   73,  110,   99,   49,
+           16,   48,   14,    6,    3,   85,    4,   11,
+           19,    7,   83,  111,  109,  101,   80,   75,
+           73,   49,   17,   48,   15,    6,    3,   85,
+            4,    3,   19,    8,   83,  111,  109,  101,
+           79,   67,   83,   80,    0,   68,  -95,   66,
+           48,   64,   49,   13,   48,   11,    6,    3,
+           85,    4,   10,   19,    4,   79,  104,   77,
+          121,   49,   14,   48,   12,    6,    3,   85,
+            4,   11,   19,    5,   66,  101,   97,  114,
+          115,   49,   15,   48,   13,    6,    3,   85,
+            4,   11,   19,    6,   84,  105,  103,  101,
+          114,  115,   49,   14,   48,   12,    6,    3,
+           85,    4,    3,   19,    5,   76,  105,  111,
+          110,  115,    0,   58,  -95,   56,   48,   54,
+           49,   16,   48,   14,    6,    3,   85,    4,
+           10,   19,    7,   67,  111,  109,  112,   97,
+          110,  121,   49,   13,   48,   11,    6,    3,
+           85,    4,   11,   19,    4,   87,  101,  115,
+          116,   49,   19,   48,   17,    6,    3,   85,
+            4,    3,   19,   10,   82,  101,  115,  112,
+          111,  110,  100,  101,  114,   49,    0,   24,
+          -94,   22,    4,   20,  -67,  -36,  114,  121,
+           92,  -79,  116,   -1,  102, -107,    7,  -21,
+           18, -113,   64,   76,   96,   -7,  -66,  -63,
+            0,   24,  -94,   22,    4,   20,  -51,  -69,
+          107,  -82,  -39,  -87,   45,   25,   41,   28,
+          -76,  -68,  -11, -110,  -94,  -97,   62,   47,
+           58, -125,    0,   51,   48,   49,   48,   47,
+            6,    9,   43,    6,    1,    5,    5,    7,
+           48,    1,    2,    4,   34,    4,   32,  -26,
+          -81, -120,  -61, -127,  -79,    0,  -39,  -54,
+           49,    3,  -51,  -57,  -85,   19, -126,   94,
+           -2,   21,   26,   98,    6,  105,  -35,  -37,
+          -29,  -73,  101,   53,   44,   15,  -19,    1,
+            1,   42,    0,  -13,    0,   59,  -95,   57,
+           48,   55,   49,   16,   48,   14,    6,    3,
+           85,    4,   10,   19,    7,   83,  111,  109,
+          101,   73,  110,   99,   49,   16,   48,   14,
+            6,    3,   85,    4,   11,   19,    7,   83,
+          111,  109,  101,   80,   75,   73,   49,   17,
+           48,   15,    6,    3,   85,    4,    3,   19,
+            8,   83,  111,  109,  101,   79,   67,   83,
+           80,    0,   68,  -95,   66,   48,   64,   49,
+           13,   48,   11,    6,    3,   85,    4,   10,
+           19,    4,   79,  104,   77,  121,   49,   14,
+           48,   12,    6,    3,   85,    4,   11,   19,
+            5,   66,  101,   97,  114,  115,   49,   15,
+           48,   13,    6,    3,   85,    4,   11,   19,
+            6,   84,  105,  103,  101,  114,  115,   49,
+           14,   48,   12,    6,    3,   85,    4,    3,
+           19,    5,   76,  105,  111,  110,  115,    0,
+           58,  -95,   56,   48,   54,   49,   16,   48,
+           14,    6,    3,   85,    4,   10,   19,    7,
+           67,  111,  109,  112,   97,  110,  121,   49,
+           13,   48,   11,    6,    3,   85,    4,   11,
+           19,    4,   87,  101,  115,  116,   49,   19,
+           48,   17,    6,    3,   85,    4,    3,   19,
+           10,   82,  101,  115,  112,  111,  110,  100,
+          101,  114,   49,    0,   24,  -94,   22,    4,
+           20,  -67,  -36,  114,  121,   92,  -79,  116,
+           -1,  102, -107,    7,  -21,   18, -113,   64,
+           76,   96,   -7,  -66,  -63,    0,   24,  -94,
+           22,    4,   20,  -51,  -69,  107,  -82,  -39,
+          -87,   45,   25,   41,   28,  -76,  -68,  -11,
+         -110,  -94,  -97,   62,   47,   58, -125,    0,
+           51,   48,   49,   48,   47,    6,    9,   43,
+            6,    1,    5,    5,    7,   48,    1,    2,
+            4,   34,    4,   32,  -26,  -81, -120,  -61,
+         -127,  -79,    0,  -39,  -54,   49,    3,  -51,
+          -57,  -85,   19, -126,   94,   -2,   21,   26,
+           98,    6,  105,  -35,  -37,  -29,  -73,  101,
+           53,   44,   15,  -19
+    };
+
+    public static void main(String[] args) throws Exception {
+        Map<String, TestCase> testList =
+                new LinkedHashMap<String, TestCase>() {{
+            put("CTOR (default)", testCtorDefault);
+            put("CTOR (List<CertStatusReqItemV2)", testCtorItemList);
+            put("CTOR (HandshakeInStream, getRequestList",
+                    testCtorInStream);
+        }};
+
+        TestUtils.runTests(testList);
+    }
+
+    public static final TestCase testCtorDefault = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                CertStatusReqListV2Extension csrlV2 =
+                        new CertStatusReqListV2Extension();
+                HandshakeOutStream hsout = new HandshakeOutStream(null);
+                csrlV2.send(hsout);
+                TestUtils.valueCheck(wrapExtData(new byte[0]),
+                        hsout.toByteArray());
+
+                // The length should be 4 (2 bytes for the type, 2 for the
+                // encoding of zero-length
+                if (csrlV2.length() != 4) {
+                    throw new RuntimeException("Incorrect length from " +
+                            "default object.  Expected 4, got " +
+                            csrlV2.length());
+                }
+
+                // Since there's no data, there are no status_type or request
+                // data fields defined.  An empty, unmodifiable list should be
+                // returned when obtained from the extension.
+                List<CertStatusReqItemV2> itemList = csrlV2.getRequestItems();
+                if (!itemList.isEmpty()) {
+                    throw new RuntimeException("Default CSRLV2 returned " +
+                            "non-empty request list");
+                } else {
+                    try {
+                        itemList.add(new CertStatusReqItemV2(
+                                StatusRequestType.OCSP_MULTI,
+                                new OCSPStatusRequest()));
+                        throw new RuntimeException("Returned itemList is " +
+                                "modifiable!");
+                    } catch (UnsupportedOperationException uoe) { }
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    public static final TestCase testCtorItemList = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            OCSPStatusRequest osr = new OCSPStatusRequest();
+            List<CertStatusReqItemV2> noItems = Collections.emptyList();
+            List<CertStatusReqItemV2> defList =
+                    new ArrayList<CertStatusReqItemV2>() {{
+                add(new CertStatusReqItemV2(StatusRequestType.OCSP_MULTI, osr));
+                add(new CertStatusReqItemV2(StatusRequestType.OCSP, osr));
+            }};
+            List<CertStatusReqItemV2> unknownTypesList =
+                    new ArrayList<CertStatusReqItemV2>() {{
+                add(new CertStatusReqItemV2(StatusRequestType.get(8),
+                        new UnknownStatusRequest(new byte[0])));
+                add(new CertStatusReqItemV2(StatusRequestType.get(12),
+                        new UnknownStatusRequest(new byte[5])));
+            }};
+
+            try {
+                HandshakeOutStream hsout = new HandshakeOutStream(null);
+                StatusRequest basicStatReq = new OCSPStatusRequest();
+
+                // Create an extension using a default-style OCSPStatusRequest
+                // (no responder IDs, no extensions).
+                CertStatusReqListV2Extension csrlv2 =
+                        new CertStatusReqListV2Extension(defList);
+                csrlv2.send(hsout);
+                TestUtils.valueCheck(wrapExtData(CSRLV2_DEF),
+                        hsout.toByteArray());
+                hsout.reset();
+
+                // Create the extension using a StatusRequestType not already
+                // instantiated as a static StatusRequestType
+                // (e.g. OCSP/OCSP_MULTI)
+                csrlv2 = new CertStatusReqListV2Extension(unknownTypesList);
+                List<CertStatusReqItemV2> itemList = csrlv2.getRequestItems();
+                if (itemList.size() != unknownTypesList.size()) {
+                    throw new RuntimeException("Custom CSRLV2 returned " +
+                            "an incorrect number of items: expected " +
+                            unknownTypesList.size() + ", got " +
+                            itemList.size());
+                } else {
+                    // Verify that the list is unmodifiable
+                    try {
+                        itemList.add(new CertStatusReqItemV2(
+                                StatusRequestType.OCSP_MULTI,
+                                new OCSPStatusRequest()));
+                        throw new RuntimeException("Returned itemList is " +
+                                "modifiable!");
+                    } catch (UnsupportedOperationException uoe) { }
+                }
+
+                // Pass a null value for the item list.  This should throw
+                // an exception
+                try {
+                    CertStatusReqListV2Extension csrlv2Null =
+                            new CertStatusReqListV2Extension(null);
+                    throw new RuntimeException("Constructor accepted a " +
+                            "null request list");
+                } catch (NullPointerException npe) { }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test the constructor that builds the ob ject using data from
+    // a HandshakeInStream
+    // This also tests the length, getReqType and getRequest methods
+    public static final TestCase testCtorInStream = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            OCSPStatusRequest osr;
+            CertStatusReqListV2Extension csrlv2;
+
+            try {
+                // To simulate the extension coming in a ServerHello, the
+                // type and length would already be read by HelloExtensions
+                // and there is no extension data
+                HandshakeInStream hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(new byte[0]));
+                csrlv2 = new CertStatusReqListV2Extension(hsis,
+                        hsis.available());
+
+                // Verify length/request list
+                if (csrlv2.length() != 4) {
+                     throw new RuntimeException("Invalid length: received " +
+                            csrlv2.length() + ", expected 4");
+                } else {
+                    List<CertStatusReqItemV2> itemList =
+                            csrlv2.getRequestItems();
+                    if (!itemList.isEmpty()) {
+                        throw new RuntimeException("Default CSRLV2 returned " +
+                                "non-empty request list");
+                    } else {
+                        try {
+                            itemList.add(new CertStatusReqItemV2(
+                                    StatusRequestType.OCSP_MULTI,
+                                    new OCSPStatusRequest()));
+                            throw new RuntimeException("Returned itemList is " +
+                                    "modifiable!");
+                        } catch (UnsupportedOperationException uoe) { }
+                    }
+                }
+
+                // Try the an extension with our basic client-generated
+                // status_request_v2 (2 items, ocsp_multi and ocsp, each with
+                // a default OCSPStatusRequest
+                hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(CSRLV2_DEF));
+                csrlv2 = new CertStatusReqListV2Extension(hsis,
+                        hsis.available());
+                if (csrlv2.length() != (CSRLV2_DEF.length + 4)) {
+                    throw new RuntimeException("Invalid length: received " +
+                            csrlv2.length() + ", expected " +
+                            CSRLV2_DEF.length + 4);
+                } else {
+                    List<CertStatusReqItemV2> itemList =
+                            csrlv2.getRequestItems();
+                    if (itemList.size() != 2) {
+                        throw new RuntimeException("Unexpected number of " +
+                                "items request list, expected 2, got " +
+                                itemList.size());
+                    } else {
+                        try {
+                            itemList.add(new CertStatusReqItemV2(
+                                    StatusRequestType.OCSP_MULTI,
+                                    new OCSPStatusRequest()));
+                            throw new RuntimeException("Returned itemList is " +
+                                    "modifiable!");
+                        } catch (UnsupportedOperationException uoe) { }
+                    }
+                }
+
+                // Try incoming data with an illegal zero-length
+                // certificate_status_req_list
+                try {
+                    hsis = new HandshakeInStream();
+                    hsis.incomingRecord(
+                            ByteBuffer.wrap(CSRLV2_INVALID_ZEROLEN));
+                    csrlv2 = new CertStatusReqListV2Extension(hsis,
+                            hsis.available());
+                    throw new RuntimeException("Unxpected successful " +
+                            "object construction");
+                } catch (SSLException ssle) { }
+
+                // Try extensions where the certificate_status_req_list length
+                // is either too long or too short
+                try {
+                    hsis = new HandshakeInStream();
+                    hsis.incomingRecord(ByteBuffer.wrap(CSRLV2_LEN_TOO_LONG));
+                    csrlv2 = new CertStatusReqListV2Extension(hsis,
+                            hsis.available());
+                    throw new RuntimeException("Unxpected successful " +
+                            "object construction");
+                } catch (SSLException ssle) { }
+
+                try {
+                    hsis = new HandshakeInStream();
+                    hsis.incomingRecord(ByteBuffer.wrap(CSRLV2_LEN_TOO_SHORT));
+                    csrlv2 = new CertStatusReqListV2Extension(hsis,
+                            hsis.available());
+                    throw new RuntimeException("Unxpected successful " +
+                            "object construction");
+                } catch (SSLException ssle) { }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Take CSRE extension data and add extension type and length decorations
+    private static byte[] wrapExtData(byte[] extData) {
+        int bufferLen = extData.length + 4;
+        ByteBuffer bb = ByteBuffer.allocate(bufferLen);
+
+        bb.putShort((short)ExtensionType.EXT_STATUS_REQUEST_V2.id);
+        bb.putShort((short)extData.length);
+        if (extData.length != 0) {
+            bb.put(extData);
+        }
+        return bb.array();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/StatusStapling/OCSPStatusRequestTests.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,340 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary OCSP Stapling for TLS (OCSPStatusRequestTests tests)
+ * @build OCSPStatusRequestTests TestCase TestUtils
+ * @run main/othervm sun.security.ssl.OCSPStatusRequestTests
+ */
+
+import java.security.cert.*;
+import java.util.*;
+import java.nio.ByteBuffer;
+import javax.security.auth.x500.X500Principal;
+import sun.security.provider.certpath.ResponderId;
+import sun.security.provider.certpath.OCSPNonceExtension;
+
+/*
+ * Checks that the hash value for a certificate's issuer name is generated
+ * correctly. Requires any certificate that is not self-signed.
+ *
+ * NOTE: this test uses Sun private classes which are subject to change.
+ */
+public class OCSPStatusRequestTests {
+
+    private static final boolean debug = false;
+
+    // The default (no Responder IDs or Extensions)
+    private static final byte[] DEF_OCSPREQ_BYTES = { 0, 0, 0, 0 };
+
+    // OCSP Extension with one Responder ID (byName: CN=OCSP Signer) and
+    // a nonce extension (32 bytes).
+    private static final byte[] OCSPREQ_1RID_1EXT = {
+            0,   28,    0,   26,  -95,   24,   48,   22,
+           49,   20,   48,   18,    6,    3,   85,    4,
+            3,   19,   11,   79,   67,   83,   80,   32,
+           83,  105,  103,  110,  101,  114,    0,   51,
+           48,   49,   48,   47,    6,    9,   43,    6,
+            1,    5,    5,    7,   48,    1,    2,    4,
+           34,    4,   32,  -34,  -83,  -66,  -17,  -34,
+          -83,  -66,  -17,  -34,  -83,  -66,  -17,  -34,
+          -83,  -66,  -17,  -34,  -83,  -66,  -17,  -34,
+          -83,  -66,  -17,  -34,  -83,  -66,  -17,  -34,
+          -83,  -66,  -17
+    };
+
+    public static void main(String[] args) throws Exception {
+        Map<String, TestCase> testList =
+                new LinkedHashMap<String, TestCase>() {{
+            put("CTOR (default)", testCtorDefault);
+            put("CTOR (Responder Id and Extension)", testCtorRidsExts);
+            put("CTOR (HandshakeInStream)", testCtorInStream);
+            put("CTOR (byte array)", testCtorByteArray);
+            put("Length tests", testLength);
+            put("Equals tests", testEquals);
+        }};
+
+        TestUtils.runTests(testList);
+    }
+
+    // Test the default constructor and its encoding
+    public static final TestCase testCtorDefault = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                // Create a OCSPStatusRequest with a single ResponderId
+                // and Extension
+                OCSPStatusRequest osrDefault = new OCSPStatusRequest();
+                HandshakeOutStream hsout = new HandshakeOutStream(null);
+                osrDefault.send(hsout);
+                System.out.println("Encoded Result:");
+                TestUtils.dumpBytes(hsout.toByteArray());
+
+                TestUtils.valueCheck(DEF_OCSPREQ_BYTES, hsout.toByteArray());
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test the constructor form that allows the user to specify zero
+    // or more ResponderId objects and/or Extensions
+    public static final TestCase testCtorRidsExts = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                List<ResponderId> ridList = new LinkedList<ResponderId>() {{
+                    add(new ResponderId(new X500Principal("CN=OCSP Signer")));
+                }};
+                List<Extension> extList = new LinkedList<Extension>() {{
+                    add(new OCSPNonceExtension(32));
+                }};
+
+                // Default-style OCSPStatusRequest using both empty Lists and
+                // null inputs
+                OCSPStatusRequest osrDef1 =
+                        new OCSPStatusRequest(new LinkedList<ResponderId>(),
+                                null);
+                OCSPStatusRequest osrDef2 =
+                        new OCSPStatusRequest(null,
+                                new LinkedList<Extension>());
+                HandshakeOutStream hsout = new HandshakeOutStream(null);
+                osrDef1.send(hsout);
+                System.out.println("Encoded Result:");
+                TestUtils.dumpBytes(hsout.toByteArray());
+                TestUtils.valueCheck(DEF_OCSPREQ_BYTES, hsout.toByteArray());
+
+                hsout.reset();
+                osrDef2.send(hsout);
+                System.out.println("Encoded Result:");
+                TestUtils.dumpBytes(hsout.toByteArray());
+                TestUtils.valueCheck(DEF_OCSPREQ_BYTES, hsout.toByteArray());
+
+                hsout.reset();
+                OCSPStatusRequest osrWithItems =
+                        new OCSPStatusRequest(ridList, extList);
+                osrWithItems.send(hsout);
+                System.out.println("Encoded Result:");
+                byte[] encodedData = hsout.toByteArray();
+                TestUtils.dumpBytes(encodedData);
+                // Check everything except the last 32 bytes (nonce data)
+                TestUtils.valueCheck(OCSPREQ_1RID_1EXT, encodedData, 0, 0,
+                        encodedData.length - 32);
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test the constructor that builds the ob ject using data from
+    // a HandshakeInStream
+    public static final TestCase testCtorInStream = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                ResponderId checkRid =
+                        new ResponderId(new X500Principal("CN=OCSP Signer"));
+                Extension checkExt = new OCSPNonceExtension(32);
+
+                HandshakeInStream hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(OCSPREQ_1RID_1EXT));
+                OCSPStatusRequest osr = new OCSPStatusRequest(hsis);
+
+                List<ResponderId> ridList = osr.getResponderIds();
+                List<Extension> extList = osr.getExtensions();
+
+                if (ridList.size() != 1 || !ridList.contains(checkRid)) {
+                    throw new RuntimeException("Responder list mismatch");
+                } else if (extList.size() !=  1 ||
+                        !extList.get(0).getId().equals(checkExt.getId())) {
+                    throw new RuntimeException("Extension list mismatch");
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test the constructor form that takes the data from a byte array
+    public static final TestCase testCtorByteArray = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                ResponderId checkRid =
+                        new ResponderId(new X500Principal("CN=OCSP Signer"));
+                Extension checkExt = new OCSPNonceExtension(32);
+
+                OCSPStatusRequest osr =
+                        new OCSPStatusRequest(OCSPREQ_1RID_1EXT);
+
+                List<ResponderId> ridList = osr.getResponderIds();
+                List<Extension> extList = osr.getExtensions();
+
+                if (ridList.size() != 1 || !ridList.contains(checkRid)) {
+                    throw new RuntimeException("Responder list mismatch");
+                } else if (extList.size() !=  1 ||
+                        !extList.get(0).getId().equals(checkExt.getId())) {
+                    throw new RuntimeException("Extension list mismatch");
+                }
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test the length functions for both default and non-default
+    // OCSPStatusRequest objects
+    public static final TestCase testLength = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                HandshakeInStream hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(OCSPREQ_1RID_1EXT));
+                OCSPStatusRequest osr = new OCSPStatusRequest(hsis);
+                OCSPStatusRequest osrDefault = new OCSPStatusRequest();
+
+                if (osrDefault.length() != DEF_OCSPREQ_BYTES.length) {
+                    throw new RuntimeException("Invalid length for default: " +
+                            "Expected" + DEF_OCSPREQ_BYTES.length +
+                            ", received " + osrDefault.length());
+                } else if (osr.length() != OCSPREQ_1RID_1EXT.length) {
+                    throw new RuntimeException("Invalid length for default: " +
+                            "Expected" + OCSPREQ_1RID_1EXT.length +
+                            ", received " + osr.length());
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test the equals method with default and non-default objects
+    public static final TestCase testEquals = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            try {
+                // Make two different lists with the same ResponderId values
+                // and also make a extension list
+                List<ResponderId> ridList1 = new LinkedList<ResponderId>() {{
+                    add(new ResponderId(new X500Principal("CN=OCSP Signer")));
+                }};
+                List<ResponderId> ridList2 = new LinkedList<ResponderId>() {{
+                    add(new ResponderId(new X500Principal("CN=OCSP Signer")));
+                }};
+                List<Extension> extList = new LinkedList<Extension>() {{
+                    add(new OCSPNonceExtension(32));
+                }};
+
+                // We expect two default OCSP objects to be equal
+                OCSPStatusRequest osrDefault = new OCSPStatusRequest();
+                if (!osrDefault.equals(new OCSPStatusRequest())) {
+                    throw new RuntimeException("Default OCSPStatusRequest" +
+                            " equality test failed");
+                }
+
+                // null test (expect false return)
+                if (osrDefault.equals(null)) {
+                    throw new RuntimeException("OCSPStatusRequest matched" +
+                            " unexpectedly");
+                }
+
+                // Self-reference test
+                OCSPStatusRequest osrSelfRef = osrDefault;
+                if (!osrDefault.equals(osrSelfRef)) {
+                    throw new RuntimeException("Default OCSPStatusRequest" +
+                            " equality test failed");
+                }
+
+                // Two OCSPStatusRequests with matching ResponderIds should
+                // be considered equal
+                OCSPStatusRequest osrByList1 =
+                        new OCSPStatusRequest(ridList1, null);
+                OCSPStatusRequest osrByList2 = new OCSPStatusRequest(ridList2,
+                        Collections.emptyList());
+                if (!osrByList1.equals(osrByList2)) {
+                    throw new RuntimeException("Single Responder ID " +
+                            "OCSPStatusRequest equality test failed");
+                }
+
+                // We expect OCSPStatusRequests with different nonces to be
+                // considered unequal.
+                HandshakeInStream hsis = new HandshakeInStream();
+                hsis.incomingRecord(ByteBuffer.wrap(OCSPREQ_1RID_1EXT));
+                OCSPStatusRequest osrStream = new OCSPStatusRequest(hsis);
+                OCSPStatusRequest osrRidExt = new OCSPStatusRequest(ridList1,
+                        extList);
+                if (osrStream.equals(osrRidExt)) {
+                    throw new RuntimeException("OCSPStatusRequest matched" +
+                            " unexpectedly");
+                }
+
+                pass = Boolean.TRUE;
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/StatusStapling/StatusResponseManagerTests.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,455 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+/*
+ * @test
+ * @bug 8046321
+ * @summary OCSP Stapling for TLS (StatusResponseManager tests)
+ * @library ../../../../java/security/testlibrary
+ * @build CertificateBuilder SimpleOCSPServer
+ * @build StatusResponseManagerTests TestCase TestUtils
+ * @run main/othervm -Djavax.net.debug=ssl:respmgr
+ *      sun.security.ssl.StatusResponseManagerTests
+ */
+
+import java.io.IOException;
+import java.math.BigInteger;
+import java.security.cert.*;
+import java.util.*;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.KeyStore;
+import java.security.PublicKey;
+import java.util.concurrent.TimeUnit;
+
+import sun.security.testlibrary.SimpleOCSPServer;
+import sun.security.testlibrary.CertificateBuilder;
+
+/*
+ * Checks that the hash value for a certificate's issuer name is generated
+ * correctly. Requires any certificate that is not self-signed.
+ *
+ * NOTE: this test uses Sun private classes which are subject to change.
+ */
+public class StatusResponseManagerTests {
+
+    private static final boolean debug = true;
+    private static final boolean ocspDebug = false;
+
+    // PKI components we will need for this test
+    static String passwd = "passphrase";
+    static String ROOT_ALIAS = "root";
+    static String INT_ALIAS = "intermediate";
+    static String SSL_ALIAS = "ssl";
+    static KeyStore rootKeystore;           // Root CA Keystore
+    static KeyStore intKeystore;            // Intermediate CA Keystore
+    static KeyStore serverKeystore;         // SSL Server Keystore
+    static KeyStore trustStore;             // SSL Client trust store
+    static X509Certificate rootCert;
+    static X509Certificate intCert;
+    static X509Certificate sslCert;
+    static SimpleOCSPServer rootOcsp;       // Root CA OCSP Responder
+    static int rootOcspPort;                // Port number for root OCSP
+    static SimpleOCSPServer intOcsp;        // Intermediate CA OCSP Responder
+    static int intOcspPort;                 // Port number for intermed. OCSP
+
+    static X509Certificate[] chain;
+
+    public static void main(String[] args) throws Exception {
+        Map<String, TestCase> testList =
+                new LinkedHashMap<String, TestCase>() {{
+            put("Basic OCSP fetch test", testOcspFetch);
+            put("Clear StatusResponseManager cache", testClearSRM);
+            put("Basic OCSP_MULTI fetch test", testOcspMultiFetch);
+            put("Test Cache Expiration", testCacheExpiry);
+        }};
+
+        // Create the CAs and OCSP responders
+        createPKI();
+
+        // Grab the certificates and make a chain we can reuse for tests
+        sslCert = (X509Certificate)serverKeystore.getCertificate(SSL_ALIAS);
+        intCert = (X509Certificate)intKeystore.getCertificate(INT_ALIAS);
+        rootCert = (X509Certificate)rootKeystore.getCertificate(ROOT_ALIAS);
+        chain = new X509Certificate[3];
+        chain[0] = sslCert;
+        chain[1] = intCert;
+        chain[2] = rootCert;
+
+        TestUtils.runTests(testList);
+
+        intOcsp.stop();
+        rootOcsp.stop();
+    }
+
+    // Test a simple RFC 6066 server-side fetch
+    public static final TestCase testOcspFetch = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            StatusResponseManager srm = new StatusResponseManager();
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            StatusRequest oReq = new OCSPStatusRequest();
+
+            try {
+                // Get OCSP responses for non-root certs in the chain
+                Map<X509Certificate, byte[]> responseMap = srm.get(
+                        StatusRequestType.OCSP, oReq, chain, 5000,
+                        TimeUnit.MILLISECONDS);
+
+                // There should be one entry in the returned map and
+                // one entry in the cache when the operation is complete.
+                if (responseMap.size() != 1) {
+                    message = "Incorrect number of responses: expected 1, got "
+                            + responseMap.size();
+                } else if (!responseMap.containsKey(sslCert)) {
+                    message = "Response map key is incorrect, expected " +
+                            sslCert.getSubjectX500Principal().toString();
+                } else if (srm.size() != 1) {
+                    message = "Incorrect number of cache entries: " +
+                            "expected 1, got " + srm.size();
+                } else {
+                    pass = Boolean.TRUE;
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test clearing the StatusResponseManager cache.
+    public static final TestCase testClearSRM = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            StatusResponseManager srm = new StatusResponseManager();
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            StatusRequest oReq = new OCSPStatusRequest();
+
+            try {
+                // Get OCSP responses for non-root certs in the chain
+                srm.get(StatusRequestType.OCSP_MULTI, oReq, chain, 5000,
+                        TimeUnit.MILLISECONDS);
+
+                // There should be two entries in the returned map and
+                // two entries in the cache when the operation is complete.
+                if (srm.size() != 2) {
+                    message = "Incorrect number of responses: expected 2, got "
+                            + srm.size();
+                } else {
+                    // Next, clear the SRM, then check the size again
+                    srm.clear();
+                    if (srm.size() != 0) {
+                        message = "Incorrect number of responses: expected 0," +
+                                " got " + srm.size();
+                    } else {
+                        pass = Boolean.TRUE;
+                    }
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test a simple RFC 6961 server-side fetch
+    public static final TestCase testOcspMultiFetch = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            StatusResponseManager srm = new StatusResponseManager();
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            StatusRequest oReq = new OCSPStatusRequest();
+
+            try {
+                // Get OCSP responses for non-root certs in the chain
+                Map<X509Certificate, byte[]> responseMap = srm.get(
+                        StatusRequestType.OCSP_MULTI, oReq, chain, 5000,
+                        TimeUnit.MILLISECONDS);
+
+                // There should be two entries in the returned map and
+                // two entries in the cache when the operation is complete.
+                if (responseMap.size() != 2) {
+                    message = "Incorrect number of responses: expected 2, got "
+                            + responseMap.size();
+                } else if (!responseMap.containsKey(sslCert) ||
+                        !responseMap.containsKey(intCert)) {
+                    message = "Response map keys are incorrect, expected " +
+                            sslCert.getSubjectX500Principal().toString() +
+                            " and " +
+                            intCert.getSubjectX500Principal().toString();
+                } else if (srm.size() != 2) {
+                    message = "Incorrect number of cache entries: " +
+                            "expected 2, got " + srm.size();
+                } else {
+                    pass = Boolean.TRUE;
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    // Test cache expiration
+    public static final TestCase testCacheExpiry = new TestCase() {
+        @Override
+        public Map.Entry<Boolean, String> runTest() {
+            // For this test, we will set the cache expiry to 5 seconds
+            System.setProperty("jdk.tls.stapling.cacheLifetime", "5");
+            StatusResponseManager srm = new StatusResponseManager();
+            Boolean pass = Boolean.FALSE;
+            String message = null;
+            StatusRequest oReq = new OCSPStatusRequest();
+
+            try {
+                // Get OCSP responses for non-root certs in the chain
+                srm.get(StatusRequestType.OCSP_MULTI, oReq, chain, 5000,
+                        TimeUnit.MILLISECONDS);
+
+                // There should be two entries in the returned map and
+                // two entries in the cache when the operation is complete.
+                if (srm.size() != 2) {
+                    message = "Incorrect number of responses: expected 2, got "
+                            + srm.size();
+                } else {
+                    // Next, wait for more than 5 seconds so the responses
+                    // in the SRM will expire.
+                    Thread.sleep(7000);
+                    if (srm.size() != 0) {
+                        message = "Incorrect number of responses: expected 0," +
+                                " got " + srm.size();
+                    } else {
+                        pass = Boolean.TRUE;
+                    }
+                }
+            } catch (Exception e) {
+                e.printStackTrace(System.out);
+                message = e.getClass().getName();
+            }
+
+            // Set the cache lifetime back to the default
+            System.setProperty("jdk.tls.stapling.cacheLifetime", "");
+            return new AbstractMap.SimpleEntry<>(pass, message);
+        }
+    };
+
+    /**
+     * Creates the PKI components necessary for this test, including
+     * Root CA, Intermediate CA and SSL server certificates, the keystores
+     * for each entity, a client trust store, and starts the OCSP responders.
+     */
+    private static void createPKI() throws Exception {
+        CertificateBuilder cbld = new CertificateBuilder();
+        KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
+        keyGen.initialize(2048);
+        KeyStore.Builder keyStoreBuilder =
+                KeyStore.Builder.newInstance("PKCS12", null,
+                        new KeyStore.PasswordProtection(passwd.toCharArray()));
+
+        // Generate Root, IntCA, EE keys
+        KeyPair rootCaKP = keyGen.genKeyPair();
+        log("Generated Root CA KeyPair");
+        KeyPair intCaKP = keyGen.genKeyPair();
+        log("Generated Intermediate CA KeyPair");
+        KeyPair sslKP = keyGen.genKeyPair();
+        log("Generated SSL Cert KeyPair");
+
+        // Set up the Root CA Cert
+        cbld.setSubjectName("CN=Root CA Cert, O=SomeCompany");
+        cbld.setPublicKey(rootCaKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("1"));
+        // Make a 3 year validity starting from 60 days ago
+        long start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(60);
+        long end = start + TimeUnit.DAYS.toMillis(1085);
+        cbld.setValidity(new Date(start), new Date(end));
+        addCommonExts(cbld, rootCaKP.getPublic(), rootCaKP.getPublic());
+        addCommonCAExts(cbld);
+        // Make our Root CA Cert!
+        X509Certificate rootCert = cbld.build(null, rootCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("Root CA Created:\n" + certInfo(rootCert));
+
+        // Now build a keystore and add the keys and cert
+        rootKeystore = keyStoreBuilder.getKeyStore();
+        Certificate[] rootChain = {rootCert};
+        rootKeystore.setKeyEntry(ROOT_ALIAS, rootCaKP.getPrivate(),
+                passwd.toCharArray(), rootChain);
+
+        // Now fire up the OCSP responder
+        rootOcsp = new SimpleOCSPServer(rootKeystore, passwd, ROOT_ALIAS, null);
+        rootOcsp.enableLog(ocspDebug);
+        rootOcsp.setNextUpdateInterval(3600);
+        rootOcsp.start();
+        Thread.sleep(1000);         // Give the server a second to start up
+        rootOcspPort = rootOcsp.getPort();
+        String rootRespURI = "http://localhost:" + rootOcspPort;
+        log("Root OCSP Responder URI is " + rootRespURI);
+
+        // Now that we have the root keystore and OCSP responder we can
+        // create our intermediate CA.
+        cbld.reset();
+        cbld.setSubjectName("CN=Intermediate CA Cert, O=SomeCompany");
+        cbld.setPublicKey(intCaKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("100"));
+        // Make a 2 year validity starting from 30 days ago
+        start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(30);
+        end = start + TimeUnit.DAYS.toMillis(730);
+        cbld.setValidity(new Date(start), new Date(end));
+        addCommonExts(cbld, intCaKP.getPublic(), rootCaKP.getPublic());
+        addCommonCAExts(cbld);
+        cbld.addAIAExt(Collections.singletonList(rootRespURI));
+        // Make our Intermediate CA Cert!
+        X509Certificate intCaCert = cbld.build(rootCert, rootCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("Intermediate CA Created:\n" + certInfo(intCaCert));
+
+        // Provide intermediate CA cert revocation info to the Root CA
+        // OCSP responder.
+        Map<BigInteger, SimpleOCSPServer.CertStatusInfo> revInfo =
+            new HashMap<>();
+        revInfo.put(intCaCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        rootOcsp.updateStatusDb(revInfo);
+
+        // Now build a keystore and add the keys, chain and root cert as a TA
+        intKeystore = keyStoreBuilder.getKeyStore();
+        Certificate[] intChain = {intCaCert, rootCert};
+        intKeystore.setKeyEntry(INT_ALIAS, intCaKP.getPrivate(),
+                passwd.toCharArray(), intChain);
+        intKeystore.setCertificateEntry(ROOT_ALIAS, rootCert);
+
+        // Now fire up the Intermediate CA OCSP responder
+        intOcsp = new SimpleOCSPServer(intKeystore, passwd,
+                INT_ALIAS, null);
+        intOcsp.enableLog(ocspDebug);
+        intOcsp.setNextUpdateInterval(3600);
+        intOcsp.start();
+        Thread.sleep(1000);
+        intOcspPort = intOcsp.getPort();
+        String intCaRespURI = "http://localhost:" + intOcspPort;
+        log("Intermediate CA OCSP Responder URI is " + intCaRespURI);
+
+        // Last but not least, let's make our SSLCert and add it to its own
+        // Keystore
+        cbld.reset();
+        cbld.setSubjectName("CN=SSLCertificate, O=SomeCompany");
+        cbld.setPublicKey(sslKP.getPublic());
+        cbld.setSerialNumber(new BigInteger("4096"));
+        // Make a 1 year validity starting from 7 days ago
+        start = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(7);
+        end = start + TimeUnit.DAYS.toMillis(365);
+        cbld.setValidity(new Date(start), new Date(end));
+
+        // Add extensions
+        addCommonExts(cbld, sslKP.getPublic(), intCaKP.getPublic());
+        boolean[] kuBits = {true, false, true, false, false, false,
+            false, false, false};
+        cbld.addKeyUsageExt(kuBits);
+        List<String> ekuOids = new ArrayList<>();
+        ekuOids.add("1.3.6.1.5.5.7.3.1");
+        ekuOids.add("1.3.6.1.5.5.7.3.2");
+        cbld.addExtendedKeyUsageExt(ekuOids);
+        cbld.addSubjectAltNameDNSExt(Collections.singletonList("localhost"));
+        cbld.addAIAExt(Collections.singletonList(intCaRespURI));
+        // Make our SSL Server Cert!
+        X509Certificate sslCert = cbld.build(intCaCert, intCaKP.getPrivate(),
+                "SHA256withRSA");
+        log("SSL Certificate Created:\n" + certInfo(sslCert));
+
+        // Provide SSL server cert revocation info to the Intermeidate CA
+        // OCSP responder.
+        revInfo = new HashMap<>();
+        revInfo.put(sslCert.getSerialNumber(),
+                new SimpleOCSPServer.CertStatusInfo(
+                        SimpleOCSPServer.CertStatus.CERT_STATUS_GOOD));
+        intOcsp.updateStatusDb(revInfo);
+
+        // Now build a keystore and add the keys, chain and root cert as a TA
+        serverKeystore = keyStoreBuilder.getKeyStore();
+        Certificate[] sslChain = {sslCert, intCaCert, rootCert};
+        serverKeystore.setKeyEntry(SSL_ALIAS, sslKP.getPrivate(),
+                passwd.toCharArray(), sslChain);
+        serverKeystore.setCertificateEntry(ROOT_ALIAS, rootCert);
+
+        // And finally a Trust Store for the client
+        trustStore = keyStoreBuilder.getKeyStore();
+        trustStore.setCertificateEntry(ROOT_ALIAS, rootCert);
+    }
+
+    private static void addCommonExts(CertificateBuilder cbld,
+            PublicKey subjKey, PublicKey authKey) throws IOException {
+        cbld.addSubjectKeyIdExt(subjKey);
+        cbld.addAuthorityKeyIdExt(authKey);
+    }
+
+    private static void addCommonCAExts(CertificateBuilder cbld)
+            throws IOException {
+        cbld.addBasicConstraintsExt(true, true, -1);
+        // Set key usage bits for digitalSignature, keyCertSign and cRLSign
+        boolean[] kuBitSettings = {true, false, false, false, false, true,
+            true, false, false};
+        cbld.addKeyUsageExt(kuBitSettings);
+    }
+
+    /**
+     * Helper routine that dumps only a few cert fields rather than
+     * the whole toString() output.
+     *
+     * @param cert An X509Certificate to be displayed
+     *
+     * @return The {@link String} output of the issuer, subject and
+     * serial number
+     */
+    private static String certInfo(X509Certificate cert) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("Issuer: ").append(cert.getIssuerX500Principal()).
+                append("\n");
+        sb.append("Subject: ").append(cert.getSubjectX500Principal()).
+                append("\n");
+        sb.append("Serial: ").append(cert.getSerialNumber()).append("\n");
+        return sb.toString();
+    }
+
+    /**
+     * Log a message on stdout
+     *
+     * @param message The message to log
+     */
+    private static void log(String message) {
+        if (debug) {
+            System.out.println(message);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/StatusStapling/TEST.properties	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,1 @@
+bootclasspath.dirs=.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/StatusStapling/TestCase.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.util.Map;
+
+public interface TestCase {
+    Map.Entry<Boolean, String> runTest();
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/ssl/StatusStapling/TestUtils.java	Mon Aug 10 14:05:37 2015 +0300
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.Map;
+
+public class TestUtils {
+
+    // private constructor to prevent instantiation for this utility class
+    private TestUtils() {
+        throw new AssertionError();
+    }
+
+    public static void runTests(Map<String, TestCase> testList) {
+        int testNo = 0;
+        int numberFailed = 0;
+        Map.Entry<Boolean, String> result;
+
+        System.out.println("============ Tests ============");
+        for (String testName : testList.keySet()) {
+            System.out.println("Test " + ++testNo + ": " + testName);
+            result = testList.get(testName).runTest();
+            System.out.print("Result: " + (result.getKey() ? "PASS" : "FAIL"));
+            System.out.println(" " +
+                    (result.getValue() != null ? result.getValue() : ""));
+            System.out.println("-------------------------------------------");
+            if (!result.getKey()) {
+                numberFailed++;
+            }
+        }
+
+        System.out.println("End Results: " + (testList.size() - numberFailed) +
+                " Passed" + ", " + numberFailed + " Failed.");
+        if (numberFailed > 0) {
+            throw new RuntimeException(
+                    "One or more tests failed, see test output for details");
+        }
+    }
+
+    public static void dumpBytes(byte[] data) {
+        dumpBytes(ByteBuffer.wrap(data));
+    }
+
+    public static void dumpBytes(ByteBuffer data) {
+        int i = 0;
+
+        data.mark();
+        while (data.hasRemaining()) {
+            if (i % 16 == 0 && i != 0) {
+                System.out.print("\n");
+            }
+            System.out.print(String.format("%02X ", data.get()));
+            i++;
+        }
+        System.out.print("\n");
+        data.reset();
+    }
+
+    public static void valueCheck(byte[] array1, byte[] array2) {
+        if (!Arrays.equals(array1, array2)) {
+            throw new RuntimeException("Array mismatch");
+        }
+    }
+
+    // Compares a range of bytes at specific offsets in each array
+    public static void valueCheck(byte[] array1, byte[] array2, int skip1,
+            int skip2, int length) {
+        ByteBuffer buf1 = ByteBuffer.wrap(array1);
+        ByteBuffer buf2 = ByteBuffer.wrap(array2);
+
+        // Skip past however many bytes are requested in both buffers
+        buf1.position(skip1);
+        buf2.position(skip2);
+
+        // Reset the limits on each buffer to account for the length
+        buf1.limit(buf1.position() + length);
+        buf2.limit(buf2.position() + length);
+
+        if (!buf1.equals(buf2)) {
+            throw new RuntimeException("Array range mismatch");
+        }
+    }
+
+    // Concatenate 1 or more arrays
+    public static byte[] gatherBuffers(byte[]... arrays) {
+        int totalLength = 0;
+        for (byte[] ar : arrays) {
+            totalLength += ar != null ? ar.length : 0;
+        }
+
+        byte[] resultBuf = new byte[totalLength];
+        int offset = 0;
+        for (byte[] ar : arrays) {
+            if (ar != null) {
+                System.arraycopy(ar, 0, resultBuf, offset, ar.length);
+                offset += ar.length;
+            }
+        }
+        return resultBuf;
+    }
+}
+
+
--- a/jdk/test/sun/text/resources/LocaleData.cldr	Wed Aug 05 03:43:31 2015 +0200
+++ b/jdk/test/sun/text/resources/LocaleData.cldr	Mon Aug 10 14:05:37 2015 +0300
@@ -2630,49 +2630,49 @@
 LocaleNames/en_SG/VC=St. Vincent & Grenadines
 LocaleNames/en_SG/WF=Wallis & Futuna
 #in
-FormatData/in/MonthNames/0=M01
-FormatData/in/MonthNames/1=M02
-FormatData/in/MonthNames/2=M03
-FormatData/in/MonthNames/3=M04
-FormatData/in/MonthNames/4=M05
-FormatData/in/MonthNames/5=M06
-FormatData/in/MonthNames/6=M07
-FormatData/in/MonthNames/7=M08
-FormatData/in/MonthNames/8=M09
-FormatData/in/MonthNames/9=M10
-FormatData/in/MonthNames/10=M11
-FormatData/in/MonthNames/11=M12
+FormatData/in/MonthNames/0=Januari
+FormatData/in/MonthNames/1=Februari
+FormatData/in/MonthNames/2=Maret
+FormatData/in/MonthNames/3=April
+FormatData/in/MonthNames/4=Mei
+FormatData/in/MonthNames/5=Juni
+FormatData/in/MonthNames/6=Juli
+FormatData/in/MonthNames/7=Agustus
+FormatData/in/MonthNames/8=September
+FormatData/in/MonthNames/9=Oktober
+FormatData/in/MonthNames/10=November
+FormatData/in/MonthNames/11=Desember
 FormatData/in/MonthNames/12=
-FormatData/in/MonthAbbreviations/0=M01
-FormatData/in/MonthAbbreviations/1=M02
-FormatData/in/MonthAbbreviations/2=M03
-FormatData/in/MonthAbbreviations/3=M04
-FormatData/in/MonthAbbreviations/4=M05
-FormatData/in/MonthAbbreviations/5=M06
-FormatData/in/MonthAbbreviations/6=M07
-FormatData/in/MonthAbbreviations/7=M08
-FormatData/in/MonthAbbreviations/8=M09
-FormatData/in/MonthAbbreviations/9=M10
-FormatData/in/MonthAbbreviations/10=M11
-FormatData/in/MonthAbbreviations/11=M12
-FormatData/in/DayNames/0=Sun
-FormatData/in/DayNames/1=Mon
-FormatData/in/DayNames/2=Tue
-FormatData/in/DayNames/3=Wed
-FormatData/in/DayNames/4=Thu
-FormatData/in/DayNames/5=Fri
-FormatData/in/DayNames/6=Sat
-FormatData/in/DayAbbreviations/0=Sun
-FormatData/in/DayAbbreviations/1=Mon
-FormatData/in/DayAbbreviations/2=Tue
-FormatData/in/DayAbbreviations/3=Wed
-FormatData/in/DayAbbreviations/4=Thu
-FormatData/in/DayAbbreviations/5=Fri
-FormatData/in/DayAbbreviations/6=Sat
-FormatData/in/Eras/0=BCE
-FormatData/in/Eras/1=CE
+FormatData/in/MonthAbbreviations/0=Jan
+FormatData/in/MonthAbbreviations/1=Feb
+FormatData/in/MonthAbbreviations/2=Mar
+FormatData/in/MonthAbbreviations/3=Apr
+FormatData/in/MonthAbbreviations/4=Mei
+FormatData/in/MonthAbbreviations/5=Jun
+FormatData/in/MonthAbbreviations/6=Jul
+FormatData/in/MonthAbbreviations/7=Agt
+FormatData/in/MonthAbbreviations/8=Sep
+FormatData/in/MonthAbbreviations/9=Okt
+FormatData/in/MonthAbbreviations/10=Nov
+FormatData/in/MonthAbbreviations/11=Des
+FormatData/in/DayNames/0=Minggu
+FormatData/in/DayNames/1=Senin
+FormatData/in/DayNames/2=Selasa
+FormatData/in/DayNames/3=Rabu
+FormatData/in/DayNames/4=Kamis
+FormatData/in/DayNames/5=Jumat
+FormatData/in/DayNames/6=Sabtu
+FormatData/in/DayAbbreviations/0=Min
+FormatData/in/DayAbbreviations/1=Sen
+FormatData/in/DayAbbreviations/2=Sel
+FormatData/in/DayAbbreviations/3=Rab
+FormatData/in/DayAbbreviations/4=Kam
+FormatData/in/DayAbbreviations/5=Jum
+FormatData/in/DayAbbreviations/6=Sab
+FormatData/in/Eras/0=SM
+FormatData/in/Eras/1=M
 FormatData/in/NumberPatterns/0=#,##0.###
-FormatData/in/NumberPatterns/1=\u00a4\u00a0#,##0.00
+FormatData/in/NumberPatterns/1=\u00a4#,##0.00
 FormatData/in/NumberPatterns/2=#,##0%
 #FormatData/in/NumberElements/0=<MISSING!>
 #FormatData/in/NumberElements/1=<MISSING!>
@@ -2685,14 +2685,14 @@
 #FormatData/in/NumberElements/8=<MISSING!>
 #FormatData/in/NumberElements/9=<MISSING!>
 #FormatData/in/NumberElements/10=<MISSING!>
-FormatData/in/TimePatterns/0=HH:mm:ss zzzz
-FormatData/in/TimePatterns/1=HH:mm:ss z
-FormatData/in/TimePatterns/2=HH:mm:ss
-FormatData/in/TimePatterns/3=HH:mm
-FormatData/in/DatePatterns/0=y MMMM d, EEEE
-FormatData/in/DatePatterns/1=y MMMM d
-FormatData/in/DatePatterns/2=y MMM d
-FormatData/in/DatePatterns/3=y-MM-dd
+FormatData/in/TimePatterns/0=HH.mm.ss zzzz
+FormatData/in/TimePatterns/1=HH.mm.ss z
+FormatData/in/TimePatterns/2=HH.mm.ss
+FormatData/in/TimePatterns/3=HH.mm
+FormatData/in/DatePatterns/0=EEEE, dd MMMM y
+FormatData/in/DatePatterns/1=d MMMM y
+FormatData/in/DatePatterns/2=d MMM y
+FormatData/in/DatePatterns/3=dd/MM/yy
 FormatData/in/DateTimePatterns/0={1} {0}
 #LocaleNames/in/ab=<MISSING!>
 #LocaleNames/in/am=<MISSING!>
@@ -2848,14 +2848,14 @@
 #LocaleNames/in/YE=<MISSING!>
 #LocaleNames/in/ZA=<MISSING!>
 #in_ID
-FormatData/in_ID/TimePatterns/0=HH:mm:ss zzzz
-FormatData/in_ID/TimePatterns/1=HH:mm:ss z
-FormatData/in_ID/TimePatterns/2=HH:mm:ss
-FormatData/in_ID/TimePatterns/3=HH:mm
-FormatData/in_ID/DatePatterns/0=y MMMM d, EEEE
-FormatData/in_ID/DatePatterns/1=y MMMM d
-FormatData/in_ID/DatePatterns/2=y MMM d
-FormatData/in_ID/DatePatterns/3=y-MM-dd
+FormatData/in_ID/TimePatterns/0=HH.mm.ss zzzz
+FormatData/in_ID/TimePatterns/1=HH.mm.ss z
+FormatData/in_ID/TimePatterns/2=HH.mm.ss
+FormatData/in_ID/TimePatterns/3=HH.mm
+FormatData/in_ID/DatePatterns/0=EEEE, dd MMMM y
+FormatData/in_ID/DatePatterns/1=d MMMM y
+FormatData/in_ID/DatePatterns/2=d MMM y
+FormatData/in_ID/DatePatterns/3=dd/MM/yy
 FormatData/in_ID/DateTimePatterns/0={1} {0}
 #CurrencyNames/in_ID/IDR/0=<MISSING!>
 #en_MT
@@ -5570,7 +5570,7 @@
 
 # bug 6507067
 TimeZoneNames/zh_TW/Asia\/Taipei/1=\u53f0\u5317\u6a19\u6e96\u6642\u9593
-TimeZoneNames/zh_TW/Asia\/Taipei/2=TST
+TimeZoneNames/zh_TW/Asia\/Taipei/2=CST
 
 # bug 6645271
 FormatData/hr_HR/DatePatterns/2=d. MMM y.
@@ -7316,20 +7316,20 @@
 FormatData/it/DayNarrows/5=V
 FormatData/it/DayNarrows/6=S
 
-FormatData/iw/DayNarrows/0=S
-FormatData/iw/DayNarrows/1=M
-FormatData/iw/DayNarrows/2=T
-FormatData/iw/DayNarrows/3=W
-FormatData/iw/DayNarrows/4=T
-FormatData/iw/DayNarrows/5=F
-FormatData/iw/DayNarrows/6=S
-FormatData/iw/standalone.DayNarrows/0=S
-FormatData/iw/standalone.DayNarrows/1=M
-FormatData/iw/standalone.DayNarrows/2=T
-FormatData/iw/standalone.DayNarrows/3=W
-FormatData/iw/standalone.DayNarrows/4=T
-FormatData/iw/standalone.DayNarrows/5=F
-FormatData/iw/standalone.DayNarrows/6=S
+FormatData/iw/DayNarrows/0=\u05d0\u05f3
+FormatData/iw/DayNarrows/1=\u05d1\u05f3
+FormatData/iw/DayNarrows/2=\u05d2\u05f3
+FormatData/iw/DayNarrows/3=\u05d3\u05f3
+FormatData/iw/DayNarrows/4=\u05d4\u05f3
+FormatData/iw/DayNarrows/5=\u05d5\u05f3
+FormatData/iw/DayNarrows/6=\u05e9\u05f3
+FormatData/iw/standalone.DayNarrows/0=\u05d0\u05f3
+FormatData/iw/standalone.DayNarrows/1=\u05d1\u05f3
+FormatData/iw/standalone.DayNarrows/2=\u05d2\u05f3
+FormatData/iw/standalone.DayNarrows/3=\u05d3\u05f3
+FormatData/iw/standalone.DayNarrows/4=\u05d4\u05f3
+FormatData/iw/standalone.DayNarrows/5=\u05d5\u05f3
+FormatData/iw/standalone.DayNarrows/6=\u05e9\u05f3
 
 FormatData/ja/DayNarrows/0=\u65e5
 FormatData/ja/DayNarrows/1=\u6708