--- a/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java Tue Mar 06 17:43:21 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testInterface/TestInterface.java Tue Mar 06 10:45:47 2018 -0800
@@ -24,7 +24,7 @@
/*
* @test
* @bug 4682448 4947464 5029946 8025633 8026567 8035473 8139101 8175200
- 8186332 8186703
+ 8186332 8186703 8182765
* @summary Verify that the public modifier does not show up in the
* documentation for public methods, as recommended by the JLS.
* If A implements I and B extends A, B should be in the list of
@@ -99,14 +99,14 @@
+ "</ul>",
//Make sure "Specified By" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
- + "<dd><code><a href=\"Interface.html#method--\">method</a>"
+ + "<dd><code><a href=\"Interface.html#method()\">method</a>"
+ "</code> in interface <code>"
+ "<a href=\"Interface.html\" title=\"interface in pkg\">"
+ "Interface</a><<a href=\"Child.html\" title=\"type parameter in Child\">"
+ "CE</a>></code></dd>",
//Make sure "Overrides" has substituted type parameters.
"<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
- + "<dd><code><a href=\"Parent.html#method--\">method</a>"
+ + "<dd><code><a href=\"Parent.html#method()\">method</a>"
+ "</code> in class <code><a href=\"Parent.html\" "
+ "title=\"class in pkg\">Parent</a><<a href=\"Child.html\" "
+ "title=\"type parameter in Child\">CE</a>></code></dd>");
@@ -120,7 +120,7 @@
+ "</dl>");
checkOutput("pkg/Interface.html", false,
- "public int method()",
+ "public int method--",
"public static final int field");
checkOutput("pkg/ClassWithStaticMembers.html", false,
@@ -135,6 +135,52 @@
"<td class=\"colFirst\"><code>static void</code></td>\n"
+ "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ + "<a href=\"#m()\">m</a></span>()</code></th>\n"
+ + "<td class=\"colLast\">\n"
+ + "<div class=\"block\">A hider method</div>\n"
+ + "</td>\n",
+
+ "<h4>staticMethod</h4>\n"
+ + "<pre>public static void staticMethod()</pre>\n"
+ + "<div class=\"block\"><span class=\"descfrmTypeLabel\">"
+ + "Description copied from interface: <code>"
+ + "<a href=\"InterfaceWithStaticMembers.html#staticMethod()\">"
+ + "InterfaceWithStaticMembers</a></code></span></div>\n"
+ + "<div class=\"block\">A static method</div>\n");
+
+ checkOutput("pkg/ClassWithStaticMembers.InnerClass.html", true,
+ "<pre>public static class <span class=\"typeNameLabel\">"
+ + "ClassWithStaticMembers.InnerClass</span>\n"
+ + "extends java.lang.Object</pre>\n"
+ + "<div class=\"block\">A hider inner class</div>");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/Child.html", true,
+ //Make sure "Specified By" has substituted type parameters.
+ "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+ + "<dd><code><a href=\"Interface.html#method--\">method</a>"
+ + "</code> in interface <code>"
+ + "<a href=\"Interface.html\" title=\"interface in pkg\">"
+ + "Interface</a><<a href=\"Child.html\" title=\"type parameter in Child\">"
+ + "CE</a>></code></dd>",
+ //Make sure "Overrides" has substituted type parameters.
+ "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+ + "<dd><code><a href=\"Parent.html#method--\">method</a>"
+ + "</code> in class <code><a href=\"Parent.html\" "
+ + "title=\"class in pkg\">Parent</a><<a href=\"Child.html\" "
+ + "title=\"type parameter in Child\">CE</a>></code></dd>");
+
+ checkOutput("pkg/ClassWithStaticMembers.html", true,
+ "<td class=\"colFirst\"><code>static void</code></td>\n"
+ + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
+ "<a href=\"#m--\">m</a></span>()</code></th>\n"
+ "<td class=\"colLast\">\n"
+ "<div class=\"block\">A hider method</div>\n"
@@ -148,11 +194,8 @@
+ "InterfaceWithStaticMembers</a></code></span></div>\n"
+ "<div class=\"block\">A static method</div>\n");
- checkOutput("pkg/ClassWithStaticMembers.InnerClass.html", true,
- "<pre>public static class <span class=\"typeNameLabel\">"
- + "ClassWithStaticMembers.InnerClass</span>\n"
- + "extends java.lang.Object</pre>\n"
- + "<div class=\"block\">A hider inner class</div>");
+ checkOutput("pkg/Interface.html", false,
+ "public int method()");
}
@Test
@@ -165,6 +208,23 @@
checkOutput("pkg1/Child.html", true,
// Ensure the correct Overrides in the inheritance hierarchy is reported
"<span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
+ "<dd><code><a href=\"GrandParent.html#method1()\">method1</a></code>" +
+ " in class " +
+ "<code><a href=\"GrandParent.html\" title=\"class in pkg1\">GrandParent</a>" +
+ "<<a href=\"Child.html\" title=\"type parameter in Child\">CE</a>></code>");
+ }
+
+ @Test
+ void test1_html4() {
+ javadoc("-d", "out-1-html4",
+ "-html4",
+ "-sourcepath", testSrc,
+ "pkg1");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg1/Child.html", true,
+ // Ensure the correct Overrides in the inheritance hierarchy is reported
+ "<span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
"<dd><code><a href=\"GrandParent.html#method1--\">method1</a></code>" +
" in class " +
"<code><a href=\"GrandParent.html\" title=\"class in pkg1\">GrandParent</a>" +