8074407: javadoc: using <pre> after @deprecated tag causes warnings
authorbpatel
Tue, 03 Oct 2017 12:58:49 -0700
changeset 47300 a905ce398074
parent 47299 56419ec66d4e
child 47301 14a82b038e5a
8074407: javadoc: using <pre> after @deprecated tag causes warnings Reviewed-by: jjg, ksrini
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css
test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java
test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestClass.java
test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java
test/langtools/jdk/javadoc/doclet/testModules/TestModules.java
test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java
test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java
test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Tue Oct 03 12:58:49 2017 -0700
@@ -334,7 +334,6 @@
 
                 List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
                 if (!commentTags.isEmpty()) {
-                    div.addContent(Contents.SPACE);
                     addInlineDeprecatedComment(annotationType, deprs.get(0), div);
                 }
             }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Tue Oct 03 12:58:49 2017 -0700
@@ -616,7 +616,6 @@
                 DocTree dt = deprs.get(0);
                 List<? extends DocTree> commentTags = ch.getBody(configuration, dt);
                 if (!commentTags.isEmpty()) {
-                    div.addContent(Contents.SPACE);
                     addInlineDeprecatedComment(typeElement, deprs.get(0), div);
                 }
             }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java	Tue Oct 03 12:58:49 2017 -0700
@@ -1715,8 +1715,7 @@
         Content div;
         Content result = commentTagsToContent(null, element, tags, first);
         if (depr) {
-            Content italic = HtmlTree.SPAN(HtmlStyle.deprecationComment, result);
-            div = HtmlTree.DIV(HtmlStyle.block, italic);
+            div = HtmlTree.DIV(HtmlStyle.deprecationComment, result);
             htmltree.addContent(div);
         }
         else {
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java	Tue Oct 03 12:58:49 2017 -0700
@@ -189,9 +189,8 @@
         if (utils.isDeprecated(member)) {
             Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(member));
             div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
-            div.addContent(Contents.SPACE);
             if (!deprs.isEmpty()) {
-                addInlineDeprecatedComment(member, deprs.get(0), div);
+                addSummaryDeprecatedComment(member, deprs.get(0), div);
             }
             tdSummary.addContent(div);
             return;
@@ -200,7 +199,6 @@
             if (te != null &&  utils.isTypeElement(te) && utils.isDeprecated(te)) {
                 Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, getDeprecatedPhrase(te));
                 div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
-                div.addContent(Contents.SPACE);
                 tdSummary.addContent(div);
             }
         }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java	Tue Oct 03 12:58:49 2017 -0700
@@ -179,7 +179,6 @@
             if (utils.isDeprecated(element)) {
                 result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                         htmlWriter.getDeprecatedPhrase(element)));
-                result.addContent(RawHtml.nbsp);
                 if (!deprs.isEmpty()) {
                     List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
                     if (!commentTags.isEmpty()) {
@@ -191,19 +190,17 @@
             if (utils.isDeprecated(element)) {
                 result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                         htmlWriter.getDeprecatedPhrase(element)));
-                result.addContent(RawHtml.nbsp);
                 if (!deprs.isEmpty()) {
                     List<? extends DocTree> bodyTags = ch.getBody(configuration, deprs.get(0));
                     Content body = commentTagsToOutput(null, element, bodyTags, false);
                     if (!body.isEmpty())
-                        result.addContent(HtmlTree.SPAN(HtmlStyle.deprecationComment, body));
+                        result.addContent(HtmlTree.DIV(HtmlStyle.deprecationComment, body));
                 }
             } else {
                 Element ee = utils.getEnclosingTypeElement(element);
                 if (utils.isDeprecated(ee)) {
                     result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                         htmlWriter.getDeprecatedPhrase(ee)));
-                    result.addContent(RawHtml.nbsp);
                 }
             }
         }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Mon Oct 02 14:49:46 2017 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Tue Oct 03 12:58:49 2017 -0700
@@ -660,7 +660,7 @@
     display:inline-block;
 }
 
-div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
+div.block div.deprecationComment, div.block div.block span.emphasizedPhrase,
 div.block div.block span.interfaceName {
     font-style:normal;
 }
--- a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java	Tue Oct 03 12:58:49 2017 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4927552 8026567 8071982 8162674 8175200 8175218 8183511 8186332 8169819
+ * @bug      4927552 8026567 8071982 8162674 8175200 8175218 8183511 8186332 8169819 8074407
  * @summary  <DESC>
  * @author   jamieh
  * @library  ../lib
@@ -81,66 +81,99 @@
                 + "extends java.lang.Object</pre>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "public&nbsp;int field</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;</div>",
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span></div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "public&nbsp;DeprecatedClassByAnnotation()</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;</div>",
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span></div>",
                 "<pre>@Deprecated\n"
                 + "public&nbsp;void&nbsp;method()</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>");
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span></div>");
 
         checkOutput("pkg/TestAnnotationType.html", true,
                 "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "@Documented\n"
                 + "public @interface <span class=\"memberNameLabel\">TestAnnotationType</span></pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">annotation_test1 passes.</span></div>\n"
-                + "</div>\n",
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">annotation_test1 passes.</div>\n"
+                + "</div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "static final&nbsp;int&nbsp;field</pre>\n"
                 + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This "
-                + "API element is subject to removal in a future version.</span>&nbsp;<span class=\"deprecationComment\">annotation_test4 passes.</span></div>",
+                + "API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">annotation_test4 passes.</div>\n"
+                + "</div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "int&nbsp;required</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;"
-                + "<span class=\"deprecationComment\">annotation_test3 passes.</span></div>",
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">annotation_test3 passes.</div>\n"
+                + "</div>",
                 "<pre>java.lang.String&nbsp;optional</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;<span class=\"deprecationComment\">annotation_test2 passes.</span></div>");
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">annotation_test2 passes.</div>\n"
+                + "</div>");
 
         checkOutput("pkg/TestClass.html", true,
                 "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public class <span class=\"typeNameLabel\">TestClass</span>\n"
                 + "extends java.lang.Object</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes.</span></div>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">class_test1 passes.</div>\n"
                 + "</div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "public&nbsp;TestClass()</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;"
-                + "<span class=\"deprecationComment\">class_test3 passes.</span></div>");
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">class_test3 passes. This is the second sentence of deprecated description for a constructor.</div>\n"
+                + "</div>",
+                "<td class=\"colLast\">\n"
+                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">class_test2 passes.</div>\n"
+                + "</div>\n"
+                + "</td>",
+                "<td class=\"colLast\">\n"
+                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">class_test3 passes.</div>\n"
+                + "</div>\n"
+                + "</td>",
+                "<td class=\"colLast\">\n"
+                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">class_test4 passes.</div>\n"
+                + "</div>\n"
+                + "</td>");
+
+        checkOutput("pkg/TestClass.html", false,
+                "<div class=\"deprecationComment\">class_test2 passes. This is the second sentence of deprecated description for a field.</div>\n"
+                + "</div>\n"
+                + "</td>",
+                "<div class=\"deprecationComment\">class_test3 passes. This is the second sentence of deprecated description for a constructor.</div>\n"
+                + "</div>\n"
+                + "</td>",
+                "<div class=\"deprecationComment\">class_test4 passes. This is the second sentence of deprecated description for a method.</div>\n"
+                + "</div>\n"
+                + "</td>");
 
         checkOutput("pkg/TestEnum.html", true,
                 "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public enum <span class=\"typeNameLabel\">TestEnum</span>\n"
                 + "extends java.lang.Enum&lt;<a href=\"../pkg/TestEnum.html\" title=\"enum in pkg\">TestEnum</a>&gt;</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">enum_test1 passes.</span></div>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">enum_test1 passes.</div>\n"
                 + "</div>",
                 "<pre>@Deprecated(forRemoval=true)\n"
                 + "public static final&nbsp;<a href=\"../pkg/TestEnum.html\" title=\"enum in pkg\">TestEnum</a> FOR_REMOVAL</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;"
-                + "<span class=\"deprecationComment\">enum_test3 passes.</span></div>");
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">enum_test3 passes.</div>\n"
+                + "</div>");
 
         checkOutput("pkg/TestError.html", true,
                 "<hr>\n"
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public class <span class=\"typeNameLabel\">TestError</span>\n"
                 + "extends java.lang.Error</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">error_test1 passes.</span></div>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">error_test1 passes.</div>\n"
                 + "</div>");
 
         checkOutput("pkg/TestException.html", true,
@@ -148,8 +181,8 @@
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public class <span class=\"typeNameLabel\">TestException</span>\n"
                 + "extends java.lang.Exception</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">exception_test1 passes.</span></div>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">exception_test1 passes.</div>\n"
                 + "</div>");
 
         checkOutput("pkg/TestInterface.html", true,
@@ -157,8 +190,8 @@
                 + "<pre>@Deprecated(forRemoval=true)\n"
                 + "public class <span class=\"typeNameLabel\">TestInterface</span>\n"
                 + "extends java.lang.Object</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>&nbsp;\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">interface_test1 passes.</span></div>\n"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span>\n"
+                + "<div class=\"deprecationComment\">interface_test1 passes.</div>\n"
                 + "</div>");
 
         checkOutput("deprecated-list.html", true,
@@ -192,7 +225,7 @@
                 + "<tr class=\"altColor\">\n"
                 + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestEnum.html\" title=\"enum in pkg\">pkg.TestEnum</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">enum_test1 passes.</span></div>\n"
+                + "<div class=\"deprecationComment\">enum_test1 passes.</div>\n"
                 + "</td>\n"
                 + "</tr>\n"
                 + "</tbody>\n"
@@ -207,7 +240,7 @@
                 + "<tr class=\"altColor\">\n"
                 + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestException.html\" title=\"class in pkg\">pkg.TestException</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">exception_test1 passes.</span></div>\n"
+                + "<div class=\"deprecationComment\">exception_test1 passes.</div>\n"
                 + "</td>\n"
                 + "</tr>\n"
                 + "</tbody>\n"
@@ -225,25 +258,25 @@
                 + "<tr class=\"rowColor\">\n"
                 + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestClass.html#field\">pkg.TestClass.field</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">class_test2 passes.</span></div>\n"
+                + "<div class=\"deprecationComment\">class_test2 passes. This is the second sentence of deprecated description for a field.</div>\n"
                 + "</td>\n"
                 + "</tr>\n"
                 + "<tr class=\"altColor\">\n"
                 + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestError.html#field\">pkg.TestError.field</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">error_test2 passes.</span></div>\n"
+                + "<div class=\"deprecationComment\">error_test2 passes.</div>\n"
                 + "</td>\n"
                 + "</tr>\n"
                 + "<tr class=\"rowColor\">\n"
                 + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestException.html#field\">pkg.TestException.field</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">exception_test2 passes.</span></div>\n"
+                + "<div class=\"deprecationComment\">exception_test2 passes.</div>\n"
                 + "</td>\n"
                 + "</tr>\n"
                 + "<tr class=\"altColor\">\n"
                 + "<th class=\"colDeprecatedItemName\" scope=\"row\"><a href=\"pkg/TestInterface.html#field\">pkg.TestInterface.field</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">interface_test2 passes.</span></div>\n"
+                + "<div class=\"deprecationComment\">interface_test2 passes.</div>\n"
                 + "</td>\n"
                 + "</tr>\n"
                 + "</tbody>\n"
--- a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestClass.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestClass.java	Tue Oct 03 12:58:49 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,18 +30,18 @@
 public class TestClass {
 
     /**
-     * @deprecated class_test2 passes.
+     * @deprecated class_test2 passes. This is the second sentence of deprecated description for a field.
      */
     public int field;
 
     /**
-     * @deprecated class_test3 passes.
+     * @deprecated class_test3 passes. This is the second sentence of deprecated description for a constructor.
      */
     @Deprecated(forRemoval=true)
     public TestClass() {}
 
     /**
-     * @deprecated class_test4 passes.
+     * @deprecated class_test4 passes. This is the second sentence of deprecated description for a method.
      */
     public void method() {}
 }
--- a/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Tue Oct 03 12:58:49 2017 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6786690 6820360 8025633 8026567 8175200 8183511 8186332
+ * @bug 6786690 6820360 8025633 8026567 8175200 8183511 8186332 8074407
  * @summary This test verifies the nesting of definition list tags.
  * @author Bhavesh Patel
  * @library ../lib
@@ -226,10 +226,11 @@
                 + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
                 + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
                 + "</dl>",
-                "<span class=\"deprecatedLabel\">Deprecated.</span>"
-                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
                 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
-                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
                 + "<div class=\"block\">This field indicates whether the C1 is "
                 + "undecorated.</div>\n"
                 + "&nbsp;\n"
@@ -241,10 +242,11 @@
                 + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
                 + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
                 + "</dl>",
-                "<span class=\"deprecatedLabel\">Deprecated.</span>"
-                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
                 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
-                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
                 + "<div class=\"block\">Reads the object stream.</div>\n"
                 + "<dl>\n"
                 + "<dt><span class=\"throwsLabel\">Throws:"
@@ -252,7 +254,7 @@
                 + "<dd><code>java.io.IOException</code></dd>\n"
                 + "</dl>",
                 "<span class=\"deprecatedLabel\">Deprecated.</span>"
-                + "&nbsp;</div>\n"
+                + "</div>\n"
                 + "<div class=\"block\">The name for this class.</div>");
     }
 
@@ -332,10 +334,11 @@
                 + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
                 + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
                 + "</dl>",
-                "<span class=\"deprecatedLabel\">Deprecated.</span>"
-                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
                 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
-                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
                 + "<div class=\"block\">This field indicates whether the C1 is "
                 + "undecorated.</div>\n"
                 + "&nbsp;\n"
@@ -347,10 +350,11 @@
                 + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
                 + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
                 + "</dl>",
-                "<span class=\"deprecatedLabel\">Deprecated.</span>"
-                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
                 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
-                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
                 + "<div class=\"block\">Reads the object stream.</div>\n"
                 + "<dl>\n"
                 + "<dt><span class=\"throwsLabel\">Throws:"
@@ -358,7 +362,7 @@
                 + "<dd><code>java.io.IOException</code></dd>\n"
                 + "</dl>",
                 "<span class=\"deprecatedLabel\">Deprecated.</span>"
-                + "&nbsp;</div>\n"
+                + "</div>\n"
                 + "<div class=\"block\">"
                 + "The name for this class.</div>");
     }
@@ -386,15 +390,20 @@
                 "<pre>boolean " +
                 "undecorated</pre>\n" +
                 "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">" +
-                "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n" +
-                " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" +
-                "setUndecorated(boolean)</code></a>.</span></div>\n" +
+                "Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>"
+                + "setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
+                +
                 "</li>",
-                "<span class=\"deprecatedLabel\">" +
-                "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version" +
-                " 1.5, replaced by\n" +
-                " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
-                "<code>setUndecorated(boolean)</code></a>.</span></div>\n" +
-                "</li>");
+                "<span class=\"deprecatedLabel\">"
+                + "Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">As of JDK version"
+                + " 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
+                + "</li>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Tue Oct 03 12:58:49 2017 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363
  *      8168766 8168688 8162674 8160196 8175799 8174974 8176778 8177562 8175218 8175823 8166306
- *      8178043 8181622 8183511 8169819
+ *      8178043 8181622 8183511 8169819 8074407
  * @summary Test modules support in javadoc.
  * @author bpatel
  * @library ../lib
@@ -448,7 +448,7 @@
                 "<section role=\"region\">\n"
                 + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal:"
                 + " This API element is subject to removal in a future version.</span>\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">This module is deprecated.</span></div>\n"
+                + "<div class=\"deprecationComment\">This module is deprecated.</div>\n"
                 + "</div>\n"
                 + "<!-- ============ MODULE DESCRIPTION =========== -->\n"
                 + "<a id=\"module.description\">\n"
@@ -1017,7 +1017,7 @@
         checkOutput("moduleA-summary.html", found,
                 "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal:"
                 + " This API element is subject to removal in a future version.</span>\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">This module is deprecated.</span></div>\n"
+                + "<div class=\"deprecationComment\">This module is deprecated.</div>\n"
                 + "</div>");
         checkOutput("deprecated-list.html", found,
                 "<ul>\n"
@@ -1027,12 +1027,12 @@
                 "<tr class=\"altColor\">\n"
                 + "<th class=\"colFirst\" scope=\"row\"><a href=\"moduleA-summary.html\">moduleA</a></th>\n"
                 + "<td class=\"colLast\">\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">This module is deprecated.</span></div>\n"
+                + "<div class=\"deprecationComment\">This module is deprecated.</div>\n"
                 + "</td>\n"
                 + "</tr>");
         checkOutput("moduleB-summary.html", !found,
                 "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
-                + "<div class=\"block\"><span class=\"deprecationComment\">This module is deprecated using just the javadoc tag.</span></div>");
+                + "<div class=\"deprecationComment\">This module is deprecated using just the javadoc tag.</div>\n");
         checkOutput("moduletags-summary.html", found,
                 "<p>@Deprecated\n"
                 + "</p>",
@@ -1143,5 +1143,5 @@
                 + "<div class=\"block\">This is a test description for the test.moduleFullName.</div>\n"
                 + "</dd>\n"
                 + "</dl>");
+    }
 }
-}
--- a/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java	Tue Oct 03 12:58:49 2017 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      6492694 8026567 8048351 8162363 8183511 8169819
+ * @bug      6492694 8026567 8048351 8162363 8183511 8169819 8074407
  * @summary  Test package deprecation.
  * @author   bpatel
  * @library  ../lib/
@@ -48,9 +48,8 @@
         checkExit(Exit.OK);
 
         checkOutput("pkg1/package-summary.html", true,
-            "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n" +
-            "<div class=\"block\"><span class=\"deprecationComment\">This package is Deprecated." +
-            "</span></div>"
+                "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">This package is Deprecated.</div>"
         );
 
         checkOutput("deprecated-list.html", true,
--- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Tue Oct 03 12:58:49 2017 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881 8181622 8182263
+ * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881 8181622 8182263 8074407
  * @summary Test the search feature of javadoc.
  * @author bpatel
  * @library ../lib
@@ -324,10 +324,10 @@
                 "<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#TWO\">TWO</a></span> - "
                 + "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>");
         checkOutput("index-all.html", true,
-                "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
-                + " <a id=\"SearchTagDeprecatedClass\" class=\"searchTagResult\">SearchTagDeprecatedClass</a></span></div>",
-                "<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
-                + " method <a id=\"SearchTagDeprecatedMethod\" class=\"searchTagResult\">SearchTagDeprecatedMethod</a></span></div>");
+                "<div class=\"deprecationComment\">class_test1 passes. Search tag"
+                + " <a id=\"SearchTagDeprecatedClass\" class=\"searchTagResult\">SearchTagDeprecatedClass</a></div>",
+                "<div class=\"deprecationComment\">error_test3 passes. Search tag for\n"
+                + " method <a id=\"SearchTagDeprecatedMethod\" class=\"searchTagResult\">SearchTagDeprecatedMethod</a></div>");
     }
 
     void checkSplitIndex() {
@@ -403,10 +403,10 @@
                 + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
                 + "SingleWord</a></span> - Search tag in pkg</dt>",
-                "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
-                + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
-                "<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
-                + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
+                "<div class=\"deprecationComment\">class_test1 passes. Search tag"
+                + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></div>",
+                "<div class=\"deprecationComment\">error_test3 passes. Search tag for\n"
+                + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></div>");
         checkOutput("index-all.html", true,
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
                 + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
@@ -434,10 +434,10 @@
                 + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
                 + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
-                "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
-                + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
-                "<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
-                + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
+                "<div class=\"deprecationComment\">class_test1 passes. Search tag"
+                + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></div>",
+                "<div class=\"deprecationComment\">error_test3 passes. Search tag for\n"
+                + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></div>");
     }
 
     void checkJavaFXOutput() {
--- a/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Tue Oct 03 12:58:49 2017 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6802694 8025633 8026567 8183511
+ * @bug 6802694 8025633 8026567 8183511 8074407
  * @summary This test verifies deprecation info in serialized-form.html.
  * @author Bhavesh Patel
  * @library ../lib
@@ -99,10 +99,11 @@
                 + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
                 + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
                 + "</dl>",
-                "<span class=\"deprecatedLabel\">Deprecated.</span>"
-                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
                 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
-                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
                 + "<div class=\"block\">This field indicates whether the C1 "
                 + "is undecorated.</div>\n"
                 + "&nbsp;\n"
@@ -114,17 +115,18 @@
                 + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
                 + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
                 + "</dl>",
-                "<span class=\"deprecatedLabel\">Deprecated.</span>"
-                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                "<span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
                 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
-                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
                 + "<div class=\"block\">Reads the object stream.</div>\n"
                 + "<dl>\n"
                 + "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
                 + "<dd><code>java.io.IOException</code> - on error</dd>\n"
                 + "</dl>",
                 "<span class=\"deprecatedLabel\">Deprecated.</span>"
-                + "&nbsp;</div>\n"
+                + "</div>\n"
                 + "<div class=\"block\">"
                 + "The name for this class.</div>");
     }
@@ -135,16 +137,20 @@
     void checkNoComment(boolean expectFound) {
         checkOutput("serialized-form.html", expectFound,
                 "<pre>boolean undecorated</pre>\n"
-                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;<span class=\"deprecationComment\">"
+                + "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">"
                 + "As of JDK version 1.5, replaced by\n"
                 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>"
-                + "setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
                 + "</li>",
                 "<span class=\"deprecatedLabel\">"
-                + "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version"
+                + "Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">As of JDK version"
                 + " 1.5, replaced by\n"
                 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
-                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<code>setUndecorated(boolean)</code></a>.</div>\n"
+                + "</div>\n"
                 + "</li>");
     }
 
--- a/test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java	Mon Oct 02 14:49:46 2017 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java	Tue Oct 03 12:58:49 2017 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8026370 8026567 8183511
+ * @bug 8026370 8026567 8183511 8074407
  * @summary This test checks the generated tag output.
  * @author Bhavesh Patel
  * @library ../lib
@@ -47,12 +47,14 @@
         checkExit(Exit.OK);
 
         checkOutput("pkg1/DeprecatedTag.html", true,
-            "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>",
-            "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;" +
-            "<span class=\"deprecationComment\">Do not use this.</span></div>");
+                "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span></div>",
+                "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\">Do not use this.</div>\n"
+                + "</div>");
 
         checkOutput("pkg1/DeprecatedTag.html", false,
-            "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated." +
-            "</span>&nbsp;<span class=\"deprecationComment\"></span></div>");
+                "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
+                + "<div class=\"deprecationComment\"></div>\n"
+                + "</div>");
     }
 }