From feab9efa5219e2bf8c0dabb2d336cd4113b516fc Mon Sep 17 00:00:00 2001 From: Bhavesh Patel Date: Tue, 3 Oct 2017 12:58:49 -0700 Subject: [PATCH] 8074407: javadoc: using
 after @deprecated tag causes
 warnings

Reviewed-by: jjg, ksrini
---
 .../html/AnnotationTypeWriterImpl.java        |  1 -
 .../doclets/formats/html/ClassWriterImpl.java |  1 -
 .../formats/html/HtmlDocletWriter.java        |  3 +-
 .../formats/html/SubWriterHolderWriter.java   |  4 +-
 .../formats/html/TagletWriterImpl.java        |  5 +-
 .../doclets/toolkit/resources/stylesheet.css  |  2 +-
 .../TestDeprecatedDocs.java                   | 95 +++++++++++++------
 .../testDeprecatedDocs/pkg/TestClass.java     |  8 +-
 .../TestHtmlDefinitionListTag.java            | 57 ++++++-----
 .../doclet/testModules/TestModules.java       | 12 +--
 .../TestPackageDeprecation.java               |  7 +-
 .../javadoc/doclet/testSearch/TestSearch.java | 26 ++---
 .../TestSerializedFormDeprecationInfo.java    | 30 +++---
 .../doclet/testTagOutput/TestTagOutput.java   | 14 +--
 14 files changed, 153 insertions(+), 112 deletions(-)

diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java
index 10630dbe559..a0e3f7e31b1 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java
@@ -334,7 +334,6 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
 
                 List commentTags = ch.getDescription(configuration, deprs.get(0));
                 if (!commentTags.isEmpty()) {
-                    div.addContent(Contents.SPACE);
                     addInlineDeprecatedComment(annotationType, deprs.get(0), div);
                 }
             }
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java
index 638ce8ada52..2c73178cff3 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java
@@ -616,7 +616,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
                 DocTree dt = deprs.get(0);
                 List commentTags = ch.getBody(configuration, dt);
                 if (!commentTags.isEmpty()) {
-                    div.addContent(Contents.SPACE);
                     addInlineDeprecatedComment(typeElement, deprs.get(0), div);
                 }
             }
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
index b56630ac3f6..31b24ee487d 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
@@ -1715,8 +1715,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
         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 {
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java
index b196c0b8ce6..34d69d99c9f 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java
@@ -189,9 +189,8 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
         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 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
             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);
             }
         }
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java
index df7ae910be8..6459f11da4a 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java
@@ -179,7 +179,6 @@ public class TagletWriterImpl extends TagletWriter {
             if (utils.isDeprecated(element)) {
                 result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                         htmlWriter.getDeprecatedPhrase(element)));
-                result.addContent(RawHtml.nbsp);
                 if (!deprs.isEmpty()) {
                     List commentTags = ch.getDescription(configuration, deprs.get(0));
                     if (!commentTags.isEmpty()) {
@@ -191,19 +190,17 @@ public class TagletWriterImpl extends TagletWriter {
             if (utils.isDeprecated(element)) {
                 result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
                         htmlWriter.getDeprecatedPhrase(element)));
-                result.addContent(RawHtml.nbsp);
                 if (!deprs.isEmpty()) {
                     List 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);
                 }
             }
         }
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css
index f66eadba1c0..0123c797c2a 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css
@@ -660,7 +660,7 @@ h1.hidden {
     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;
 }
diff --git a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java
index 185829d0a85..84a61d08b8f 100644
--- a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java
+++ b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java
@@ -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  
  * @author   jamieh
  * @library  ../lib
@@ -81,66 +81,99 @@ public class TestDeprecatedDocs extends JavadocTester {
                 + "extends java.lang.Object
", "
@Deprecated(forRemoval=true)\n"
                 + "public int field
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. 
", + + "
Deprecated, for removal: This API element is subject to removal in a future version.
", "
@Deprecated(forRemoval=true)\n"
                 + "public DeprecatedClassByAnnotation()
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. 
", + + "
Deprecated, for removal: This API element is subject to removal in a future version.
", "
@Deprecated\n"
                 + "public void method()
\n" - + "
Deprecated. 
"); + + "
Deprecated.
"); checkOutput("pkg/TestAnnotationType.html", true, "
\n" + "
@Deprecated(forRemoval=true)\n"
                 + "@Documented\n"
                 + "public @interface TestAnnotationType
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. \n" - + "
annotation_test1 passes.
\n" - + "
\n", + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
annotation_test1 passes.
\n" + + "
", "
@Deprecated(forRemoval=true)\n"
                 + "static final int field
\n" + "
Deprecated, for removal: This " - + "API element is subject to removal in a future version. annotation_test4 passes.
", + + "API element is subject to removal in a future version.\n" + + "
annotation_test4 passes.
\n" + + "", "
@Deprecated(forRemoval=true)\n"
                 + "int required
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. " - + "annotation_test3 passes.
", + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
annotation_test3 passes.
\n" + + "
", "
java.lang.String optional
\n" - + "
Deprecated. annotation_test2 passes.
"); + + "
Deprecated.\n" + + "
annotation_test2 passes.
\n" + + "
"); checkOutput("pkg/TestClass.html", true, "
\n" + "
@Deprecated(forRemoval=true)\n"
                 + "public class TestClass\n"
                 + "extends java.lang.Object
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. \n" - + "
class_test1 passes.
\n" + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
class_test1 passes.
\n" + "
", "
@Deprecated(forRemoval=true)\n"
                 + "public TestClass()
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. " - + "class_test3 passes.
"); + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
class_test3 passes. This is the second sentence of deprecated description for a constructor.
\n" + + "
", + "\n" + + "
Deprecated.\n" + + "
class_test2 passes.
\n" + + "
\n" + + "", + "\n" + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
class_test3 passes.
\n" + + "
\n" + + "", + "\n" + + "
Deprecated.\n" + + "
class_test4 passes.
\n" + + "
\n" + + ""); + + checkOutput("pkg/TestClass.html", false, + "
class_test2 passes. This is the second sentence of deprecated description for a field.
\n" + + "
\n" + + "", + "
class_test3 passes. This is the second sentence of deprecated description for a constructor.
\n" + + "\n" + + "", + "
class_test4 passes. This is the second sentence of deprecated description for a method.
\n" + + "\n" + + ""); checkOutput("pkg/TestEnum.html", true, "
\n" + "
@Deprecated(forRemoval=true)\n"
                 + "public enum TestEnum\n"
                 + "extends java.lang.Enum<TestEnum>
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. \n" - + "
enum_test1 passes.
\n" + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
enum_test1 passes.
\n" + "
", "
@Deprecated(forRemoval=true)\n"
                 + "public static final TestEnum FOR_REMOVAL
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. " - + "enum_test3 passes.
"); + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
enum_test3 passes.
\n" + + "
"); checkOutput("pkg/TestError.html", true, "
\n" + "
@Deprecated(forRemoval=true)\n"
                 + "public class TestError\n"
                 + "extends java.lang.Error
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. \n" - + "
error_test1 passes.
\n" + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
error_test1 passes.
\n" + "
"); checkOutput("pkg/TestException.html", true, @@ -148,8 +181,8 @@ public class TestDeprecatedDocs extends JavadocTester { + "
@Deprecated(forRemoval=true)\n"
                 + "public class TestException\n"
                 + "extends java.lang.Exception
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. \n" - + "
exception_test1 passes.
\n" + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
exception_test1 passes.
\n" + "
"); checkOutput("pkg/TestInterface.html", true, @@ -157,8 +190,8 @@ public class TestDeprecatedDocs extends JavadocTester { + "
@Deprecated(forRemoval=true)\n"
                 + "public class TestInterface\n"
                 + "extends java.lang.Object
\n" - + "
Deprecated, for removal: This API element is subject to removal in a future version. \n" - + "
interface_test1 passes.
\n" + + "
Deprecated, for removal: This API element is subject to removal in a future version.\n" + + "
interface_test1 passes.
\n" + "
"); checkOutput("deprecated-list.html", true, @@ -192,7 +225,7 @@ public class TestDeprecatedDocs extends JavadocTester { + "\n" + "pkg.TestEnum\n" + "\n" - + "
enum_test1 passes.
\n" + + "
enum_test1 passes.
\n" + "\n" + "\n" + "\n" @@ -207,7 +240,7 @@ public class TestDeprecatedDocs extends JavadocTester { + "\n" + "pkg.TestException\n" + "\n" - + "
exception_test1 passes.
\n" + + "
exception_test1 passes.
\n" + "\n" + "\n" + "\n" @@ -225,25 +258,25 @@ public class TestDeprecatedDocs extends JavadocTester { + "\n" + "pkg.TestClass.field\n" + "\n" - + "
class_test2 passes.
\n" + + "
class_test2 passes. This is the second sentence of deprecated description for a field.
\n" + "\n" + "\n" + "\n" + "pkg.TestError.field\n" + "\n" - + "
error_test2 passes.
\n" + + "
error_test2 passes.
\n" + "\n" + "\n" + "\n" + "pkg.TestException.field\n" + "\n" - + "
exception_test2 passes.
\n" + + "
exception_test2 passes.
\n" + "\n" + "\n" + "\n" + "pkg.TestInterface.field\n" + "\n" - + "
interface_test2 passes.
\n" + + "
interface_test2 passes.
\n" + "\n" + "\n" + "\n" diff --git a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestClass.java b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestClass.java index 87f6f4b1b5f..0fb178252ce 100644 --- a/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestClass.java +++ b/test/langtools/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestClass.java @@ -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 @@ package pkg; 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() {} } diff --git a/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java b/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java index c43b09e74cb..e91028fdf8a 100644 --- a/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java +++ b/test/langtools/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java @@ -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 @@ public class TestHtmlDefinitionListTag extends JavadocTester { + "
" + "C1.setUndecorated(boolean)
\n" + "", - "Deprecated." - + " As of JDK version 1.5, replaced by\n" + "Deprecated.\n" + + "
As of JDK version 1.5, replaced by\n" + " " - + "setUndecorated(boolean).
\n" + + "setUndecorated(boolean).
\n" + + "
\n" + "
This field indicates whether the C1 is " + "undecorated.
\n" + " \n" @@ -241,10 +242,11 @@ public class TestHtmlDefinitionListTag extends JavadocTester { + "
" + "C1.setUndecorated(boolean)
\n" + "", - "Deprecated." - + " As of JDK version 1.5, replaced by\n" + "Deprecated.\n" + + "
As of JDK version 1.5, replaced by\n" + " " - + "setUndecorated(boolean).
\n" + + "setUndecorated(boolean).
\n" + + "
\n" + "
Reads the object stream.
\n" + "
\n" + "
Throws:" @@ -252,7 +254,7 @@ public class TestHtmlDefinitionListTag extends JavadocTester { + "
java.io.IOException
\n" + "
", "Deprecated." - + " \n" + + "\n" + "
The name for this class.
"); } @@ -332,10 +334,11 @@ public class TestHtmlDefinitionListTag extends JavadocTester { + "
" + "C1.setUndecorated(boolean)
\n" + "", - "Deprecated." - + " As of JDK version 1.5, replaced by\n" + "Deprecated.\n" + + "
As of JDK version 1.5, replaced by\n" + " " - + "setUndecorated(boolean).
\n" + + "setUndecorated(boolean).\n" + + "\n" + "
This field indicates whether the C1 is " + "undecorated.
\n" + " \n" @@ -347,10 +350,11 @@ public class TestHtmlDefinitionListTag extends JavadocTester { + "
" + "C1.setUndecorated(boolean)
\n" + "", - "Deprecated." - + " As of JDK version 1.5, replaced by\n" + "Deprecated.\n" + + "
As of JDK version 1.5, replaced by\n" + " " - + "setUndecorated(boolean).
\n" + + "setUndecorated(boolean).\n" + + "\n" + "
Reads the object stream.
\n" + "
\n" + "
Throws:" @@ -358,7 +362,7 @@ public class TestHtmlDefinitionListTag extends JavadocTester { + "
java.io.IOException
\n" + "
", "Deprecated." - + " \n" + + "\n" + "
" + "The name for this class.
"); } @@ -386,15 +390,20 @@ public class TestHtmlDefinitionListTag extends JavadocTester { "
boolean " +
                 "undecorated
\n" + "
" + - "Deprecated. As of JDK version 1.5, replaced by\n" + - " " + - "setUndecorated(boolean).
\n" + + "Deprecated.
\n" + + "
As of JDK version 1.5, replaced by\n" + + " " + + "setUndecorated(boolean).
\n" + + "\n" + + "", - "" + - "Deprecated. As of JDK version" + - " 1.5, replaced by\n" + - " " + - "setUndecorated(boolean).\n" + - ""); + "" + + "Deprecated.\n" + + "
As of JDK version" + + " 1.5, replaced by\n" + + " " + + "setUndecorated(boolean).
\n" + + "\n" + + ""); } } diff --git a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java index 4efffd51da1..1e2ace3484d 100644 --- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java +++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java @@ -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 @@ public class TestModules extends JavadocTester { "
\n" + "
Deprecated, for removal:" + " This API element is subject to removal in a future version.\n" - + "
This module is deprecated.
\n" + + "
This module is deprecated.
\n" + "
\n" + "\n" + "\n" @@ -1017,7 +1017,7 @@ public class TestModules extends JavadocTester { checkOutput("moduleA-summary.html", found, "
Deprecated, for removal:" + " This API element is subject to removal in a future version.\n" - + "
This module is deprecated.
\n" + + "
This module is deprecated.
\n" + "
"); checkOutput("deprecated-list.html", found, "
    \n" @@ -1027,12 +1027,12 @@ public class TestModules extends JavadocTester { "\n" + "moduleA\n" + "\n" - + "
    This module is deprecated.
    \n" + + "
    This module is deprecated.
    \n" + "\n" + ""); checkOutput("moduleB-summary.html", !found, "
    Deprecated.\n" - + "
    This module is deprecated using just the javadoc tag.
    "); + + "
    This module is deprecated using just the javadoc tag.
    \n"); checkOutput("moduletags-summary.html", found, "

    @Deprecated\n" + "

    ", @@ -1143,5 +1143,5 @@ public class TestModules extends JavadocTester { + "
    This is a test description for the test.moduleFullName.
    \n" + "\n" + ""); -} + } } diff --git a/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java b/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java index eee9d1fd0dc..1d3f52d28e3 100644 --- a/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java +++ b/test/langtools/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java @@ -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 @@ public class TestPackageDeprecation extends JavadocTester { checkExit(Exit.OK); checkOutput("pkg1/package-summary.html", true, - "
    Deprecated.\n" + - "
    This package is Deprecated." + - "
    " + "
    Deprecated.\n" + + "
    This package is Deprecated.
    " ); checkOutput("deprecated-list.html", true, diff --git a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java index 7333de09530..71e3bafea76 100644 --- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java +++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java @@ -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 @@ public class TestSearch extends JavadocTester { "
    TWO - " + "pkg2.TestEnum
    "); checkOutput("index-all.html", true, - "
    class_test1 passes. Search tag" - + " SearchTagDeprecatedClass
    ", - "
    error_test3 passes. Search tag for\n" - + " method SearchTagDeprecatedMethod
    "); + "
    class_test1 passes. Search tag" + + " SearchTagDeprecatedClass
    ", + "
    error_test3 passes. Search tag for\n" + + " method SearchTagDeprecatedMethod
    "); } void checkSplitIndex() { @@ -403,10 +403,10 @@ public class TestSearch extends JavadocTester { + "SearchTagDeprecatedClass - Search tag in pkg2.TestClass", "
    " + "SingleWord - Search tag in pkg
    ", - "
    class_test1 passes. Search tag" - + " SearchTagDeprecatedClass
    ", - "
    error_test3 passes. Search tag for\n" - + " method SearchTagDeprecatedMethod
    "); + "
    class_test1 passes. Search tag" + + " SearchTagDeprecatedClass
    ", + "
    error_test3 passes. Search tag for\n" + + " method SearchTagDeprecatedMethod
    "); checkOutput("index-all.html", true, "
    " + "search phrase deprecated - Search tag in pkg2.TestEnum.ONE
    ", @@ -434,10 +434,10 @@ public class TestSearch extends JavadocTester { + "search phrase deprecated - Search tag in pkg2.TestEnum.ONE", "
    " + "SearchTagDeprecatedMethod - Search tag in pkg2.TestError
    ", - "
    class_test1 passes. Search tag" - + " SearchTagDeprecatedClass
    ", - "
    error_test3 passes. Search tag for\n" - + " method SearchTagDeprecatedMethod
    "); + "
    class_test1 passes. Search tag" + + " SearchTagDeprecatedClass
    ", + "
    error_test3 passes. Search tag for\n" + + " method SearchTagDeprecatedMethod
    "); } void checkJavaFXOutput() { diff --git a/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java b/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java index 3597e1c8c24..e0365f117a1 100644 --- a/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java +++ b/test/langtools/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java @@ -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 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester { + "
    " + "C1.setUndecorated(boolean)
    \n" + "", - "Deprecated." - + " As of JDK version 1.5, replaced by\n" + "Deprecated.\n" + + "
    As of JDK version 1.5, replaced by\n" + " " - + "setUndecorated(boolean).
    \n" + + "setUndecorated(boolean).
    \n" + + "
    \n" + "
    This field indicates whether the C1 " + "is undecorated.
    \n" + " \n" @@ -114,17 +115,18 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester { + "
    " + "C1.setUndecorated(boolean)
    \n" + "", - "Deprecated." - + " As of JDK version 1.5, replaced by\n" + "Deprecated.\n" + + "
    As of JDK version 1.5, replaced by\n" + " " - + "setUndecorated(boolean).
    \n" + + "setUndecorated(boolean).
    \n" + + "\n" + "
    Reads the object stream.
    \n" + "
    \n" + "
    Throws:
    \n" + "
    java.io.IOException - on error
    \n" + "
    ", "Deprecated." - + " \n" + + "\n" + "
    " + "The name for this class.
    "); } @@ -135,16 +137,20 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester { void checkNoComment(boolean expectFound) { checkOutput("serialized-form.html", expectFound, "
    boolean undecorated
    \n" - + "
    Deprecated. " + + "
    Deprecated.\n" + + "
    " + "As of JDK version 1.5, replaced by\n" + " " - + "setUndecorated(boolean).
    \n" + + "setUndecorated(boolean).
    \n" + + "
    \n" + "", "" - + "Deprecated. As of JDK version" + + "Deprecated.\n" + + "
    As of JDK version" + " 1.5, replaced by\n" + " " - + "setUndecorated(boolean).
    \n" + + "setUndecorated(boolean).\n" + + "\n" + ""); } diff --git a/test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java b/test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java index 46a08f63bdd..f98a5efa64f 100644 --- a/test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java +++ b/test/langtools/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java @@ -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 @@ public class TestTagOutput extends JavadocTester { checkExit(Exit.OK); checkOutput("pkg1/DeprecatedTag.html", true, - "
    Deprecated. 
    ", - "
    Deprecated. " + - "Do not use this.
    "); + "
    Deprecated.
    ", + "
    Deprecated.\n" + + "
    Do not use this.
    \n" + + "
    "); checkOutput("pkg1/DeprecatedTag.html", false, - "
    Deprecated." + - " 
    "); + "
    Deprecated.\n" + + "
    \n" + + "
    "); } }