Skip to content

Commit

Permalink
8273860: Javadoc Deprecated API list should not use italic font for d…
Browse files Browse the repository at this point in the history
…escription column

Reviewed-by: jjg
  • Loading branch information
hns committed Aug 17, 2022
1 parent 0cc66ae commit 1ef4e48
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
Expand Up @@ -121,7 +121,7 @@ protected void addExtraIndexLink(DeprecatedAPIListBuilder list, Content target)
protected void addComments(Element e, Content desc) {
List<? extends DeprecatedTree> tags = utils.getDeprecatedTrees(e);
if (!tags.isEmpty()) {
addInlineDeprecatedComment(e, tags.get(0), desc);
addInlineComment(e, tags.get(0), desc);
} else {
desc.add(Text.EMPTY);
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, 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
Expand All @@ -24,7 +24,7 @@
/*
* @test
* @bug 4927552 8026567 8071982 8162674 8175200 8175218 8183511 8186332
* 8169819 8074407 8191030 8182765 8184205 8243533 8261976
* 8169819 8074407 8191030 8182765 8184205 8243533 8261976 8273860
* @summary test generated docs for deprecated items
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
Expand Down Expand Up @@ -292,7 +292,7 @@ public void test() {
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color"><a href="pkg/TestEnum.html" title="enum class in pkg">pkg.TestEnum</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">enum_test1 passes.</div>
<div class="block">enum_test1 passes.</div>
</div>""",
"""
<div id="exception-class">
Expand All @@ -302,11 +302,11 @@ public void test() {
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color"><a href="pkg/TestError.html" title="class in pkg">pkg.TestError</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">error_test1 passes.</div>
<div class="block">error_test1 passes.</div>
</div>
<div class="col-summary-item-name odd-row-color"><a href="pkg/TestException.html" title="class in pkg">pkg.TestException</a></div>
<div class="col-last odd-row-color">
<div class="deprecation-comment">exception_test1 passes.</div>
<div class="block">exception_test1 passes.</div>
</div>""",
"""
<div id="field">
Expand All @@ -318,23 +318,23 @@ public void test() {
<div class="col-last even-row-color"></div>
<div class="col-summary-item-name odd-row-color"><a href="pkg/TestAnnotationType.html#field">pkg.TestAnnotationType.field</a></div>
<div class="col-last odd-row-color">
<div class="deprecation-comment">annotation_test4 passes.</div>
<div class="block">annotation_test4 passes.</div>
</div>
<div class="col-summary-item-name even-row-color"><a href="pkg/TestClass.html#field">pkg.TestClass.field</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">class_test2 passes. This is the second sentence of deprecated description for a field.</div>
<div class="block">class_test2 passes. This is the second sentence of deprecated description for a field.</div>
</div>
<div class="col-summary-item-name odd-row-color"><a href="pkg/TestError.html#field">pkg.TestError.field</a></div>
<div class="col-last odd-row-color">
<div class="deprecation-comment">error_test2 passes.</div>
<div class="block">error_test2 passes.</div>
</div>
<div class="col-summary-item-name even-row-color"><a href="pkg/TestException.html#field">pkg.TestException.field</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">exception_test2 passes.</div>
<div class="block">exception_test2 passes.</div>
</div>
<div class="col-summary-item-name odd-row-color"><a href="pkg/TestInterface.html#field">pkg.TestInterface.field</a></div>
<div class="col-last odd-row-color">
<div class="deprecation-comment">interface_test2 passes.</div>
<div class="block">interface_test2 passes.</div>
</div>
</div>
</div>""",
Expand All @@ -348,23 +348,23 @@ public void test() {
<div class="col-last even-row-color"></div>
<div class="col-summary-item-name odd-row-color"><a href="pkg/TestAnnotationType.html#optional()">pkg.TestAnnotationType.optional()</a></div>
<div class="col-last odd-row-color">
<div class="deprecation-comment">annotation_test2 passes.</div>
<div class="block">annotation_test2 passes.</div>
</div>
<div class="col-summary-item-name even-row-color"><a href="pkg/TestAnnotationType.html#required()">pkg.TestAnnotationType.required()</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">annotation_test3 passes.</div>
<div class="block">annotation_test3 passes.</div>
</div>
<div class="col-summary-item-name odd-row-color"><a href="pkg/TestClass.html#method()">pkg.TestClass.method()</a></div>
<div class="col-last odd-row-color">
<div class="deprecation-comment">class_test5 passes. This is the second sentence of deprecated description for a method.</div>
<div class="block">class_test5 passes. This is the second sentence of deprecated description for a method.</div>
</div>
<div class="col-summary-item-name even-row-color"><a href="pkg/TestClass.html#overloadedMethod(int)">pkg.TestClass.overloadedMethod<wbr>(int)</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">class_test7 passes. Overloaded method 2.</div>
<div class="block">class_test7 passes. Overloaded method 2.</div>
</div>
<div class="col-summary-item-name odd-row-color"><a href="pkg/TestClass.html#overloadedMethod(java.lang.String)">pkg.TestClass.overloadedMethod<wbr>(String)</a></div>
<div class="col-last odd-row-color">
<div class="deprecation-comment">class_test6 passes. Overloaded method 1.</div>
<div class="block">class_test6 passes. Overloaded method 1.</div>
</div>""",
"""
<div id="constructor">
Expand All @@ -376,11 +376,11 @@ public void test() {
<div class="col-last even-row-color"></div>
<div class="col-summary-item-name odd-row-color"><a href="pkg/TestClass.html#%3Cinit%3E()">pkg.TestClass()</a></div>
<div class="col-last odd-row-color">
<div class="deprecation-comment">class_test3 passes. This is the second sentence of deprecated description for a constructor.</div>
<div class="block">class_test3 passes. This is the second sentence of deprecated description for a constructor.</div>
</div>
<div class="col-summary-item-name even-row-color"><a href="pkg/TestClass.html#%3Cinit%3E(java.lang.String)">pkg.TestClass<wbr>(String)</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">class_test4 passes. Overloaded constructor.</div>
<div class="block">class_test4 passes. Overloaded constructor.</div>
</div>""");
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2022, 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
Expand Down Expand Up @@ -704,13 +704,13 @@ void checkHtmlTableContents() {
"""
<div class="col-summary-item-name even-row-color"><a href="pkg2/C2.html#dep_field">pkg2.C2.dep_field</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">don't use this field anymore.</div>
<div class="block">don't use this field anymore.</div>
</div>""",
"""
<div class="col-summary-item-name even-row-color"><a href="pkg1/C1.html#deprecat\
edMethod()">pkg1.C1.deprecatedMethod()</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">don't use this anymore.</div>
<div class="block">don't use this anymore.</div>
</div>""");

// Constant values
Expand Down
Expand Up @@ -1117,7 +1117,7 @@ void checkModuleDeprecation(boolean found) {
"""
<div class="col-summary-item-name even-row-color"><a href="moduleA/module-summary.html">moduleA</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">This module is deprecated.</div>""");
<div class="block">This module is deprecated.</div>""");
checkOutput("moduleB/module-summary.html", !found,
"""
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
Expand Down
Expand Up @@ -524,7 +524,7 @@ public record R(int r1) { }""");
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color"><a href="p/R.html" title="class in p">p.R</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">Do not use.</div>
<div class="block">Do not use.</div>
</div>""");
}

Expand Down

1 comment on commit 1ef4e48

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.