8074407: javadoc: using <pre> after @deprecated tag causes warnings
Reviewed-by: jjg, ksrini
This commit is contained in:
parent
448718c0af
commit
feab9efa52
@ -334,7 +334,6 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
|
||||
|
||||
List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
|
||||
if (!commentTags.isEmpty()) {
|
||||
div.addContent(Contents.SPACE);
|
||||
addInlineDeprecatedComment(annotationType, deprs.get(0), div);
|
||||
}
|
||||
}
|
||||
|
@ -616,7 +616,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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<? extends DocTree> 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<? 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 @@ public class TestDeprecatedDocs extends JavadocTester {
|
||||
+ "extends java.lang.Object</pre>",
|
||||
"<pre>@Deprecated(forRemoval=true)\n"
|
||||
+ "public 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> </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 DeprecatedClassByAnnotation()</pre>\n"
|
||||
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span> </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 void method()</pre>\n"
|
||||
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span> </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> \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 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> <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 required</pre>\n"
|
||||
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span> "
|
||||
+ "<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 optional</pre>\n"
|
||||
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span> <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> \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 TestClass()</pre>\n"
|
||||
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated, for removal: This API element is subject to removal in a future version.</span> "
|
||||
+ "<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<<a href=\"../pkg/TestEnum.html\" title=\"enum in pkg\">TestEnum</a>></pre>\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\">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 <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> "
|
||||
+ "<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> \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 @@ public class TestDeprecatedDocs extends JavadocTester {
|
||||
+ "<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> \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 @@ public class TestDeprecatedDocs extends JavadocTester {
|
||||
+ "<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> \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 @@ public class TestDeprecatedDocs extends JavadocTester {
|
||||
+ "<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 @@ public class TestDeprecatedDocs extends JavadocTester {
|
||||
+ "<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 @@ public class TestDeprecatedDocs extends JavadocTester {
|
||||
+ "<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"
|
||||
|
@ -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() {}
|
||||
}
|
||||
|
@ -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 {
|
||||
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
|
||||
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
|
||||
+ "</dl>",
|
||||
"<span class=\"deprecatedLabel\">Deprecated.</span>"
|
||||
+ " <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"
|
||||
+ " \n"
|
||||
@ -241,10 +242,11 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
|
||||
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
|
||||
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
|
||||
+ "</dl>",
|
||||
"<span class=\"deprecatedLabel\">Deprecated.</span>"
|
||||
+ " <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 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
|
||||
+ "<dd><code>java.io.IOException</code></dd>\n"
|
||||
+ "</dl>",
|
||||
"<span class=\"deprecatedLabel\">Deprecated.</span>"
|
||||
+ " </div>\n"
|
||||
+ "</div>\n"
|
||||
+ "<div class=\"block\">The name for this class.</div>");
|
||||
}
|
||||
|
||||
@ -332,10 +334,11 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
|
||||
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
|
||||
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
|
||||
+ "</dl>",
|
||||
"<span class=\"deprecatedLabel\">Deprecated.</span>"
|
||||
+ " <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"
|
||||
+ " \n"
|
||||
@ -347,10 +350,11 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
|
||||
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
|
||||
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
|
||||
+ "</dl>",
|
||||
"<span class=\"deprecatedLabel\">Deprecated.</span>"
|
||||
+ " <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 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
|
||||
+ "<dd><code>java.io.IOException</code></dd>\n"
|
||||
+ "</dl>",
|
||||
"<span class=\"deprecatedLabel\">Deprecated.</span>"
|
||||
+ " </div>\n"
|
||||
+ "</div>\n"
|
||||
+ "<div class=\"block\">"
|
||||
+ "The name for this class.</div>");
|
||||
}
|
||||
@ -386,15 +390,20 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
|
||||
"<pre>boolean " +
|
||||
"undecorated</pre>\n" +
|
||||
"<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">" +
|
||||
"Deprecated.</span> <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> <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>");
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
"<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 @@ public class TestModules extends JavadocTester {
|
||||
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 @@ public class TestModules extends JavadocTester {
|
||||
"<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 @@ public class TestModules extends JavadocTester {
|
||||
+ "<div class=\"block\">This is a test description for the test.moduleFullName.</div>\n"
|
||||
+ "</dd>\n"
|
||||
+ "</dl>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
"<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,
|
||||
|
@ -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 {
|
||||
"<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 @@ public class TestSearch extends JavadocTester {
|
||||
+ "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 @@ public class TestSearch extends JavadocTester {
|
||||
+ "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() {
|
||||
|
@ -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 {
|
||||
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
|
||||
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
|
||||
+ "</dl>",
|
||||
"<span class=\"deprecatedLabel\">Deprecated.</span>"
|
||||
+ " <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"
|
||||
+ " \n"
|
||||
@ -114,17 +115,18 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
|
||||
+ "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
|
||||
+ "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
|
||||
+ "</dl>",
|
||||
"<span class=\"deprecatedLabel\">Deprecated.</span>"
|
||||
+ " <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>"
|
||||
+ " </div>\n"
|
||||
+ "</div>\n"
|
||||
+ "<div class=\"block\">"
|
||||
+ "The name for this class.</div>");
|
||||
}
|
||||
@ -135,16 +137,20 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
|
||||
void checkNoComment(boolean expectFound) {
|
||||
checkOutput("serialized-form.html", expectFound,
|
||||
"<pre>boolean undecorated</pre>\n"
|
||||
+ "<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span> <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> <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>");
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
"<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span> </div>",
|
||||
"<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span> " +
|
||||
"<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> <span class=\"deprecationComment\"></span></div>");
|
||||
"<div class=\"deprecationBlock\"><span class=\"deprecatedLabel\">Deprecated.</span>\n"
|
||||
+ "<div class=\"deprecationComment\"></div>\n"
|
||||
+ "</div>");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user