Skip to content


Browse files Browse the repository at this point in the history
8266044: Nested class summary should show kind of class or interface
Reviewed-by: jjg
  • Loading branch information
hns committed May 6, 2021
1 parent e840597 commit 2dcbedf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Expand Up @@ -192,7 +192,13 @@ protected void addModifierAndType(Element member, TypeMirror type,
HtmlTree code = new HtmlTree(TagName.CODE);
addModifier(member, code);
if (type == null) {
code.add(utils.isClass(member) ? "class" : "interface");
code.add(switch (member.getKind()) {
case ENUM -> "enum";
case INTERFACE -> "interface";
case ANNOTATION_TYPE -> "@interface";
case RECORD -> "record";
default -> "class";
} else {
List<? extends TypeParameterElement> list = utils.isExecutableElement(member)
Expand Down
Expand Up @@ -24,7 +24,7 @@
* @test
* @bug 4951228 6290760 8025633 8026567 8081854 8162363 8175200 8177417 8186332 8182765
* 8258602
* 8258602 8266044
* @summary Test the case where the overridden method returns a different
* type than the method in the child class. Make sure the
* documentation is inherited but the return type isn't.
Expand Down Expand Up @@ -96,19 +96,19 @@ public void testSummaries() {
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>private static interface&nbsp;</code></div>
<div class="col-first even-row-color"><code>private static @interface&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="Members.A.html" class="type-name-link" title="annotation interface in pkg3">Members.A</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>private static final class&nbsp;</code></div>
<div class="col-second odd-row-color"><code><a href="Members.C.html" class="type-name-link" title="class in pkg3">Members.C</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>private static class&nbsp;</code></div>
<div class="col-first even-row-color"><code>private static enum&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="Members.E.html" class="type-name-link" title="enum class in pkg3">Members.E</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
<div class="col-first odd-row-color"><code>private static interface&nbsp;</code></div>
<div class="col-second odd-row-color"><code><a href="Members.I.html" class="type-name-link" title="interface in pkg3">Members.I</a></code></div>
<div class="col-last odd-row-color">&nbsp;</div>
<div class="col-first even-row-color"><code>private static final class&nbsp;</code></div>
<div class="col-first even-row-color"><code>private static final record&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="Members.R.html" class="type-name-link" title="class in pkg3">Members.R</a></code></div>
<div class="col-last even-row-color">&nbsp;</div>
Expand Down

1 comment on commit 2dcbedf

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.