More html tag outliers.\n"
+ "
\n"
+ " @Override\n"
diff --git a/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java b/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java
index 79b02b66668..8079ca63adf 100644
--- a/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java
+++ b/test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java
@@ -96,7 +96,7 @@ public class TestMemberInheritance extends JavadocTester {
+ ""
+ ""
+ "between(java.time.LocalDate startDateInclusive,\n"
- + " java.time.LocalDate endDateExclusive) | ");
+ + "java.time.LocalDate endDateExclusive)");
checkOutput("pkg1/Implementer.html", false,
"Methods inherited from interface pkg1."
+ "returnTypeTest()",
// Check return type in member detail.
- "public "
- + "PublicChild returnTypeTest()
",
+ "",
""
+ "PublicChild() | ");
diff --git a/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java b/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java
new file mode 100644
index 00000000000..57d83b30949
--- /dev/null
+++ b/test/langtools/jdk/javadoc/doclet/testMethodSignature/TestMethodSignature.java
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2019, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8214126
+ * @summary Method signatures not formatted correctly in browser
+ * @library ../../lib/
+ * @modules jdk.javadoc/jdk.javadoc.internal.tool
+ * @build javadoc.tester.*
+ * @run main TestMethodSignature
+ */
+
+import javadoc.tester.JavadocTester;
+
+public class TestMethodSignature extends JavadocTester {
+
+ public static void main(String... args) throws Exception {
+ TestMethodSignature tester = new TestMethodSignature();
+ tester.runTests();
+ }
+
+ @Test
+ public void test() {
+ javadoc("-d", "out",
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/C.html", true,
+ "
"
+ + "@Generated(\"GeneratedConstructor\")\n"
+ + "public "
+ + "C()
",
+
+ "public static"
+ + " void "
+ + "simpleMethod(int i,\n"
+ + "java.lang.String s,\nboolean b)
",
+
+ "@Generated"
+ + "(value=\"SomeGeneratedName\",\n date=\"a date\",\n"
+ + " comments=\"some comment about the method below\")\n"
+ + "public static void annotatedMethod"
+ + "(int i,\n"
+ + "java.lang.String s,\nboolean b)
",
+
+ "public static"
+ + "
<T1 extends java.lang.AutoCloseable,\n"
+ + "T2 extends java.lang.AutoCloseable,\n"
+ + "T3 extends java.lang.AutoCloseable,\n"
+ + "T4 extends java.lang.AutoCloseable,\n"
+ + "T5 extends java.lang.AutoCloseable,\n"
+ + "T6 extends java.lang.AutoCloseable,\n"
+ + "T7 extends java.lang.AutoCloseable,\n"
+ + "T8 extends java.lang.AutoCloseable>\n"
+ + "
C.With8Types<T1,T2,T3,"
+ + "T4,T5,T6,T7,T8> "
+ + "
bigGenericMethod("
+ + "
C.F0<? extends T1> t1,\n"
+ + ""
+ + "C.F0<? extends T2> t2,\n"
+ + ""
+ + "C.F0<? extends T3> t3,\n"
+ + ""
+ + "C.F0<? extends T4> t4,\n"
+ + ""
+ + "C.F0<? extends T5> t5,\n"
+ + ""
+ + "C.F0<? extends T6> t6,\n"
+ + ""
+ + "C.F0<? extends T7> t7,\n"
+ + ""
+ + "C.F0<? extends T8> t8)\n"
+ + " "
+ + "throws
java.lang.IllegalArgumentException,\n"
+ + "java.lang.IllegalStateException ",
+
+ ""
+ + "@Generated(value=\"SomeGeneratedName\",\n"
+ + " date=\"a date\",\n"
+ + " comments=\"some comment about the method below\")\n"
+ + "public static "
+ + "
"
+ + "<T1 extends java.lang.AutoCloseable,\n"
+ + "T2 extends java.lang.AutoCloseable,\n"
+ + "T3 extends java.lang.AutoCloseable,\n"
+ + "T4 extends java.lang.AutoCloseable,\n"
+ + "T5 extends java.lang.AutoCloseable,\n"
+ + "T6 extends java.lang.AutoCloseable,\n"
+ + "T7 extends java.lang.AutoCloseable,\n"
+ + "T8 extends java.lang.AutoCloseable>\n"
+ + "
C.With8Types<T1,T2,T3,"
+ + "T4,T5,T6,T7,T8> "
+ + "
bigGenericAnnotatedMethod("
+ + "
C.F0<? extends T1> t1,\n"
+ + ""
+ + "C.F0<? extends T2> t2,\n"
+ + ""
+ + "C.F0<? extends T3> t3,\n"
+ + ""
+ + "C.F0<? extends T4> t4,\n"
+ + ""
+ + "C.F0<? extends T5> t5,\n"
+ + ""
+ + "C.F0<? extends T6> t6,\n"
+ + ""
+ + "C.F0<? extends T7> t7,\n"
+ + ""
+ + "C.F0<? extends T8> t8)\n"
+ + " "
+ + "throws
java.lang.IllegalArgumentException,\n"
+ + "java.lang.IllegalStateException \n"
+ + "Generic method with eight type args and annotation.
");
+
+ }
+}
diff --git a/test/langtools/jdk/javadoc/doclet/testMethodSignature/pkg/C.java b/test/langtools/jdk/javadoc/doclet/testMethodSignature/pkg/C.java
new file mode 100644
index 00000000000..604299e2e16
--- /dev/null
+++ b/test/langtools/jdk/javadoc/doclet/testMethodSignature/pkg/C.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2019, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+import javax.annotation.processing.Generated;
+
+/**
+ * Test class for rendering of method signatures. This provides some pathologically
+ * complex method signatures that require special handling. Other features are
+ * covered by other tests.
+ */
+public class C {
+
+ /**
+ * Annotated constructor.
+ */
+ @Generated(value = "GeneratedConstructor")
+ public C() {}
+
+
+ public interface F0 {
+ T apply() throws Exception;
+ }
+
+ public static class With8Types { }
+
+
+ /**
+ * Simple method.
+ *
+ * @param i param 1
+ * @param s param 2
+ * @param b param 3
+ */
+ public static void simpleMethod(int i, String s, boolean b) {}
+
+
+ /**
+ * Annotated method.
+ *
+ * @param i param 1
+ * @param s param 2
+ * @param b param 3
+ */
+ @Generated(
+ value = "SomeGeneratedName",
+ date = "a date",
+ comments = "some comment about the method below")
+ public static void annotatedMethod(int i, String s, boolean b) {}
+
+
+ /**
+ * Generic method with eight type args.
+ *
+ * @param type 1
+ * @param type 2
+ * @param type 3
+ * @param type 4
+ * @param type 5
+ * @param type 6
+ * @param type 7
+ * @param type 8
+ * @param t1 param 1
+ * @param t2 param 2
+ * @param t3 param 3
+ * @param t4 param 4
+ * @param t5 param 5
+ * @param t6 param 6
+ * @param t7 param 7
+ * @param t8 param 8
+ * @return null
+ */
+ public static
+
+ With8Types bigGenericMethod(
+ F0 extends T1> t1,
+ F0 extends T2> t2,
+ F0 extends T3> t3,
+ F0 extends T4> t4,
+ F0 extends T5> t5,
+ F0 extends T6> t6,
+ F0 extends T7> t7,
+ F0 extends T8> t8)
+ throws IllegalArgumentException, IllegalStateException { return null; }
+
+
+ /**
+ * Generic method with eight type args and annotation.
+ *
+ * @param type 1
+ * @param type 2
+ * @param type 3
+ * @param type 4
+ * @param type 5
+ * @param type 6
+ * @param type 7
+ * @param type 8
+ * @param t1 param 1
+ * @param t2 param 2
+ * @param t3 param 3
+ * @param t4 param 4
+ * @param t5 param 5
+ * @param t6 param 6
+ * @param t7 param 7
+ * @param t8 param 8
+ * @return null
+ */
+ @Generated(
+ value = "SomeGeneratedName",
+ date = "a date",
+ comments = "some comment about the method below")
+ public static
+
+ With8Types bigGenericAnnotatedMethod(
+ F0 extends T1> t1,
+ F0 extends T2> t2,
+ F0 extends T3> t3,
+ F0 extends T4> t4,
+ F0 extends T5> t5,
+ F0 extends T6> t6,
+ F0 extends T7> t7,
+ F0 extends T8> t8)
+ throws IllegalArgumentException, IllegalStateException { return null; }
+}
diff --git a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java
index 15eea03379d..d0515b7cba5 100644
--- a/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java
+++ b/test/langtools/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java
@@ -81,8 +81,10 @@ public class TestNewLanguageFeatures extends JavadocTester {
"Returns the enum constant of this type with the specified name",
"Overloaded valueOf() method has correct documentation.",
"Overloaded values method has correct documentation.",
- "public static Coin" +
- " valueOf(java.lang.String name)
\n" +
+ "public static "
+ + "
Coin "
+ + "
valueOf("
+ + "
java.lang.String name) \n" +
"Returns the enum constant of this type with the specified name.\n" +
"The string must match
exactly an identifier used to declare an\n" +
"enum constant in this type. (Extraneous whitespace characters are \n" +
@@ -131,8 +133,11 @@ public class TestNewLanguageFeatures extends JavadocTester {
+ "
V - This is the second type "
+ "parameter.",
// Signature of method with type parameters
- "public <T extends java.util.List,V> "
- + "java.lang.String[] methodThatHasTypeParameters",
+ "public "
+ + "<T extends java.util.List,\nV>\n"
+ + "java.lang.String[] "
+ + "methodThatHasTypeParameters(T param1,\n"
+ + "V param2)
",
// Method that returns TypeParameters
"E[] | \n"
@@ -140,10 +145,11 @@ public class TestNewLanguageFeatures extends JavadocTester {
+ ""
+ "methodThatReturnsTypeParameterA(E[] e)",
- "public E[] "
- + "methodThatReturnsTypeParameterA(E[] e)
\n",
+ "\n",
"<T extends java.lang.Object & java.lang.Comparable<? super T>>"
+ " T | \n"
+ ""
@@ -210,7 +216,10 @@ public class TestNewLanguageFeatures extends JavadocTester {
// Handle multiple bounds.
//==============================================================
checkOutput("pkg/MultiTypeParameters.html", true,
- "public <T extends java.lang.Number & java.lang.Runnable> T foo(T t)");
+ "public "
+ + "<T extends java.lang.Number & java.lang.Runnable>\n"
+ + "T foo"
+ + "(T t) ");
//==============================================================
// Test Class-Use Documentation for Type Parameters.
@@ -531,45 +540,42 @@ public class TestNewLanguageFeatures extends JavadocTester {
+ "AnnotationTypeUsage\n"
+ "extends java.lang.Object",
// FIELD
- "@AnnotationType("
- + "optional"
- + "=\"Field Annotation\",\n"
- + " "
- + "required=1994)\n"
- + "public int field",
+ "",
// CONSTRUCTOR
- "@AnnotationType("
- + "optional"
- + "=\"Constructor Annotation\",\n"
- + " "
- + "required=1994)\n"
- + "public AnnotationTypeUsage()",
+ "",
// METHOD
- "@AnnotationType("
- + "optional"
- + "=\"Method Annotation\",\n"
- + " "
- + "required=1994)\n"
- + "public void method()",
+ "",
// METHOD PARAMS
- "public void methodWithParams("
- + ""
- + "@AnnotationType("
- + "optional=\"Parameter Annotation\",required=1994)\n"
- + " int documented,\n"
- + " int undocmented)",
+ "",
// CONSTRUCTOR PARAMS
- "public AnnotationTypeUsage("
- + "@AnnotationType("
- + "optional=\"Constructor Param Annotation\",required=1994)\n"
- + " int documented,\n"
- + " int undocmented)");
+ "public "
+ + " AnnotationTypeUsage( "
+ + "@AnnotationType("
+ + "optional=\"Constructor Param Annotation\","
+ + "required=1994)\n"
+ + "int documented,\n"
+ + "int undocmented) ");
//=================================
// Annotatation Type Usage
diff --git a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java
index 5f7ef795663..f0650a6daac 100644
--- a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java
+++ b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java
@@ -197,15 +197,16 @@ public class TestOptions extends JavadocTester {
+ "\n"
+ "\n"
+ "\n"
- + "static final java.lang.String "
- + ""
- + "DEFAULT_NAME ",
+ + "",
"name\n"
+ "\n"
+ "\n"
+ "\n"
- + "java.lang.String name ");
+ + "");
checkOutput("src-html/linksource/AnnotationTypeField.html", true,
"Source code",
@@ -215,10 +216,9 @@ public class TestOptions extends JavadocTester {
checkOutput("linksource/Properties.html", true,
"public class "
+ "Properties",
- "public java.lang.Object someProperty ",
- "public java.lang.Object someProperty() ");
+ "");
checkOutput("src-html/linksource/Properties.html", true,
"Source code",
@@ -228,12 +228,15 @@ public class TestOptions extends JavadocTester {
checkOutput("linksource/SomeClass.html", true,
"public class "
+ "SomeClass\nextends java.lang.Object",
- "public int "
- + "field ",
- "public "
- + "SomeClass() ",
- "public int "
- + "method() ");
+ "public "
+ + " int "
+ + "field ",
+ "",
+ "public "
+ + " int "
+ + "method() ");
checkOutput("src-html/linksource/SomeClass.html", true,
"Source code",
@@ -247,12 +250,14 @@ public class TestOptions extends JavadocTester {
+ "public int method() {");
checkOutput("linksource/SomeEnum.html", true,
- "public static final SomeEnum VALUE1 ",
- "public static final SomeEnum VALUE2 ");
+ "",
+ "");
checkOutput("src-html/linksource/SomeEnum.html", true,
"029 VALUE1,",
diff --git a/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java b/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java
index 8aa37af9199..e3033e3c603 100644
--- a/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java
+++ b/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java
@@ -516,10 +516,14 @@ public class TestOrdering extends JavadocTester {
checkOrder("pkg5/AnnoFieldTest.html",
"Field Details",
- "static final int one ",
- "static final int two ",
- "static final int three ",
- "static final int four ");
+ "static final "
+ + "int one ",
+ "static final "
+ + "int two ",
+ "static final "
+ + "int three ",
+ "static final "
+ + "int four ");
checkOrder("pkg5/AnnoOptionalTest.html",
"Optional Element Summary",
diff --git a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestBadOverride.java b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestBadOverride.java
index 0a0884e5678..4686a57e4ac 100644
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestBadOverride.java
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestBadOverride.java
@@ -57,7 +57,8 @@ public class TestBadOverride extends JavadocTester {
+ "\n"
+ "\n"
+ "\n"
- + "public void toString() \n"
+ + "public "
+ + "void toString() \n"
+ "Why can't I do this ? \n"
+ "");
}
diff --git a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java
index b80df0f3443..5cd911615fb 100644
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverriddenDeprecatedMethods.java
@@ -57,9 +57,11 @@ public class TestOverriddenDeprecatedMethods extends JavadocTester {
checkOrder("pkg1/SubClass.html",
"Method Detail",
- "@Deprecated\npublic void func1()",
+ "@Deprecated\npublic "
+ + "void func1()",
"Deprecated. ",
- "@Deprecated\npublic void func2()",
+ "@Deprecated\npublic "
+ + "void func2()",
"Deprecated. ",
"deprecated with comments ");
}
diff --git a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java
index d969e087a8f..bd9435edc14 100644
--- a/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java
+++ b/test/langtools/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java
@@ -70,7 +70,10 @@ public class TestPrivateClasses extends JavadocTester {
+ "pkg.PublicChild \n"
+ "",
// Method is documented as though it is declared in the inheriting method.
- "public void methodInheritedFromParent(int p1)",
+ "public "
+ + "void "
+ + "methodInheritedFromParent(int p1)\n"
+ + " throws java.lang.Exception ",
" \n"
+ "- All Implemented Interfaces:
\n"
+ ""
diff --git a/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java b/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java
index 683ed834779..a008f3bead5 100644
--- a/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java
+++ b/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java
@@ -50,10 +50,10 @@ public class TestProperty extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/MyClass.html", true,
- "public final ObjectProperty"
- + "<MyObj> goodProperty \n"
+ "\n"
+ "This is an Object property where the "
+ "Object is a single Object. \n"
+ "\n"
@@ -63,10 +63,10 @@ public class TestProperty extends JavadocTester {
+ "setGood(MyObj) \n"
+ " ",
- "public final ObjectProperty"
- + "<MyObj[]> badProperty \n"
+ "\n"
+ "This is an Object property where the "
+ "Object is an array. \n"
+ "\n"
@@ -94,11 +94,11 @@ public class TestProperty extends JavadocTester {
);
checkOutput("pkg/MyClassT.html", true,
- "public final ObjectProperty"
- + "<java.util.List<T>> "
- + "listProperty \n"
+ "\n"
+ "This is an Object property where the "
+ "Object is a single List<T>. \n"
+ "\n"
diff --git a/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java b/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java
index 02cf067e3e7..6ccf05aa962 100644
--- a/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java
+++ b/test/langtools/jdk/javadoc/doclet/testSerializedFormWithClassFile/TestSerializedFormWithClassFile.java
@@ -73,10 +73,11 @@ public class TestSerializedFormWithClassFile extends JavadocTester {
checkExit(Exit.OK);
checkOutput("serialized-form.html", true,
- "public void readObject"
- + "(java.io.ObjectInputStream arg0)\n"
- + " throws java.lang.ClassNotFoundException,\n"
- + " java.io.IOException \n");
+ "public "
+ + "void readObject"
+ + "(java.io.ObjectInputStream arg0)\n"
+ + " throws java.lang.ClassNotFoundException,\n"
+ + "java.io.IOException \n");
}
void createTestClass(Path base, Path srcDir) throws Exception {
diff --git a/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java b/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java
index fd9c9a31eb6..1ff798e8178 100644
--- a/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java
+++ b/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java
@@ -165,9 +165,9 @@ public class TestStylesheet extends JavadocTester {
+ "th.colFirst a:link, th.colFirst a:visited,\n"
+ "th.colSecond a:link, th.colSecond a:visited,\n"
+ "th.colConstructorName a:link, th.colConstructorName a:visited,\n"
- + "th.colDeprecatedItemName a:link, th.colDeprecatedItemName a:visited, \n"
- + ".constantValuesContainer td a:link, .constantValuesContainer td a:visited, \n"
- + ".allClassesContainer td a:link, .allClassesContainer td a:visited, \n"
+ + "th.colDeprecatedItemName a:link, th.colDeprecatedItemName a:visited,\n"
+ + ".constantValuesContainer td a:link, .constantValuesContainer td a:visited,\n"
+ + ".allClassesContainer td a:link, .allClassesContainer td a:visited,\n"
+ ".allPackagesContainer td a:link, .allPackagesContainer td a:visited {\n"
+ " font-weight:bold;\n"
+ "}",
diff --git a/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java b/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java
index 09d488bbecc..15e9054d909 100644
--- a/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java
+++ b/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java
@@ -90,7 +90,8 @@ public class TestSummaryTag extends JavadocTester {
+ "\n"
+ "\n"
+ "\n"
- + "public void m3() \n"
+ + "public "
+ + "void m3() \n"
+ "First sentence some text maybe second sentence. \n"
+ "\n"
);
diff --git a/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java b/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java
index 5fe5f9028b7..517719dc9af 100644
--- a/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java
+++ b/test/langtools/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java
@@ -115,249 +115,274 @@ public class TestTypeAnnotations extends JavadocTester {
// Test for type annotations on fields (Fields.java).
checkOutput("typeannos/DefaultScope.html", true,
- "Parameterized<@FldA java.lang.String,"
- + "@FldB java.lang.String> bothTypeArgs ",
+ "",
- "@FldA java.lang.String @FldB [] "
- + "array1Deep ",
+ "",
- "java.lang.String @FldB [][] array2SecondOld ",
+ "java.lang.String "
+ + "@FldB [][] "
+ + " array2SecondOld ",
// When JDK-8068737, we should change the order
- ""
- + "@FldD java.lang.String "
- + "@FldC "
- + "@FldB [] "
- + "@FldC "
- + "@FldA [] "
- + "array2Deep ");
+ "");
checkOutput("typeannos/ModifiedScoped.html", true,
- "public final Parameterized<@FldA "
- + "Parameterized<@FldA java.lang.String,"
- + "@FldB java.lang.String>,@FldB java.lang.String> "
- + "nestedParameterized ",
+ "",
- "public final @FldA java.lang.String[][] "
- + "array2 ");
+ "public final "
+ + " "
+ + "@FldA java.lang.String[][] "
+ + " array2 ");
// Test for type annotations on method return types (MethodReturnType.java).
checkOutput("typeannos/MtdDefaultScope.html", true,
- "public <T> @MRtnA java.lang.String"
- + " method() ",
+ "",
// When JDK-8068737 is fixed, we should change the order
- ""
- + "@MRtnA java.lang.String "
- + "@MRtnB [] "
- + "@MRtnA []"
- + " array2Deep() ",
+ "",
- "@MRtnA java.lang.String[][] array2() ");
+ "@MRtnA java.lang.String[][] "
+ + " array2() ");
checkOutput("typeannos/MtdModifiedScoped.html", true,
- "public final MtdParameterized<@MRtnA "
- + "MtdParameterized<@MRtnA java.lang."
- + "String,@MRtnB java.lang.String>,@MRtnB java."
- + "lang.String> nestedMtdParameterized() ");
+ "");
// Test for type annotations on method type parameters (MethodTypeParameters.java).
checkOutput("typeannos/UnscopedUnmodified.html", true,
- "<K extends @MTyParamA java.lang.String>"
- + " void methodExtends() ",
+ "<K extends "
+ + "@MTyParamA "
+ + "java.lang.String> void "
+ + " methodExtends() ",
- "<K extends @MTyParamA "
- + "MtdTyParameterized<@MTyParamB java.lang.String"
- + ">> void nestedExtends() ");
+ "");
checkOutput("typeannos/PublicModifiedMethods.html", true,
- "public final <K extends @MTyParamA "
- + "java.lang.String> void methodExtends() ",
+ "public final "
+ + " <K extends @MTyParamA java.lang.String>\n"
+ + " void "
+ + " methodExtends() ",
- "public final <K extends @MTyParamA "
- + "java.lang.String,V extends @MTyParamA "
- + "MtdTyParameterized<@MTyParamB java.lang.String"
- + ">> void dual() ");
+ "");
// Test for type annotations on parameters (Parameters.java).
checkOutput("typeannos/Parameters.html", true,
- "void unannotated("
- + "ParaParameterized<java.lang.String,java.lang.String>"
- + " a)",
+ "void "
+ + " unannotated( "
+ + "ParaParameterized"
+ + "<java.lang.String,java.lang.String> a) ",
- "void nestedParaParameterized("
- + "ParaParameterized<@ParamA "
- + "ParaParameterized<void "
+ + "nestedParaParameterized"
+ + "(ParaParameterized<@ParamA ParaParameterized<@ParamA java.lang.String,"
- + "@ParamB java.lang.String>,@ParamB"
- + " java.lang.String> a)",
+ + "@ParamB "
+ + "java.lang.String>,"
+ + "@ParamB java.lang.String> a)",
// When JDK-8068737 is fixed, we should change the order
- "void array2Deep(@ParamA java.lang.String "
- + ""
- + "@ParamB [] "
- + ""
- + "@ParamA []"
- + " a) ");
+ "");
// Test for type annotations on throws (Throws.java).
checkOutput("typeannos/ThrDefaultUnmodified.html", true,
- "void oneException()\n"
- + " throws @ThrA java.lang.Exception ",
+ "void "
+ + " oneException()\n"
+ + " throws @ThrA java.lang.Exception ",
- "void twoExceptions()\n"
- + " throws @ThrA java.lang.RuntimeException,\n"
- + " @ThrA java.lang.Exception ");
+ "void "
+ + " twoExceptions()\n"
+ + " throws @ThrA java.lang.RuntimeException,\n"
+ + "@ThrA "
+ + "java.lang.Exception ");
checkOutput("typeannos/ThrPublicModified.html", true,
- "public final void oneException"
- + "(java.lang.String a)\n throws @ThrA java.lang.Exception ",
+ "public final "
+ + " void "
+ + "oneException( java.lang.String a)\n"
+ + " throws @ThrA java.lang.Exception ",
- "public final void twoExceptions"
- + "(java.lang.String a)\n throws public final "
+ + "void "
+ + "twoExceptions(java.lang.String a)\n"
+ + " throws @ThrA java.lang.RuntimeException,\n"
- + " @ThrA java.lang.Exception ");
+ + "@ThrA "
+ + "java.lang.Exception");
checkOutput("typeannos/ThrWithValue.html", true,
- "void oneException()\n"
- + " throws @ThrB("
- + "\"m\") java.lang.Exception",
+ "void "
+ + " oneException()\n"
+ + " throws @ThrB(\"m\") java.lang.Exception ",
- "void twoExceptions()\n"
- + " throws @ThrB("
- + "\"m\") java.lang.RuntimeException,\n"
- + " @ThrA java.lang.Exception");
+ "void "
+ + " twoExceptions()\n"
+ + " throws @ThrB(\"m\") java.lang.RuntimeException,\n"
+ + "@ThrA "
+ + "java.lang.Exception ");
// Test for type annotations on type parameters (TypeParameters.java).
checkOutput("typeannos/TestMethods.html", true,
- "<K,@TyParaA V extends @TyParaA "
- + "java.lang.String> void secondAnnotated() "
+ "<K,\n"
+ + "@TyParaA V extends "
+ + "@TyParaA "
+ + "java.lang.String>\n void "
+ + " secondAnnotated() "
);
// Test for type annotations on wildcard type (Wildcards.java).
checkOutput("typeannos/BoundTest.html", true,
- "void wcExtends(MyList<? extends @WldA"
- + " java.lang.String> l) ",
+ "void "
+ + " wcExtends( "
+ + "MyList<? extends "
+ + "@WldA "
+ + "java.lang.String> l) ",
- "MyList<? super @WldA java.lang.String>"
- + " returnWcSuper() ");
+ "MyList<? super @WldA java.lang.String> "
+ + " returnWcSuper() ");
checkOutput("typeannos/BoundWithValue.html", true,
- "void wcSuper(MyList<? super @WldB("
- + "\"m\") java.lang."
- + "String> l)",
+ "void "
+ + " wcSuper( "
+ + "MyList<? super "
+ + "@WldB(\"m\") "
+ + "java.lang.String> l) ",
- "MyList<? extends @WldB("
- + "\"m\") java.lang.String"
- + "> returnWcExtends()");
+ "MyList<? extends @WldB(\"m\") java.lang.String>"
+ + " returnWcExtends() ");
// Test for receiver annotations (Receivers.java).
checkOutput("typeannos/DefaultUnmodified.html", true,
- "void withException(@RcvrA "
- + "DefaultUnmodified this)\n"
- + " throws java."
- + "lang.Exception ",
+ "void "
+ + " withException( "
+ + "@RcvrA"
+ + " DefaultUnmodified this)\n"
+ + " throws java.lang.Exception ",
- "java.lang.String nonVoid(@RcvrA @RcvrB"
- + "(\"m\")"
- + " DefaultUnmodified this) ",
+ "java.lang.String "
+ + " nonVoid( "
+ + "@RcvrA "
+ + "@RcvrB(\"m\")"
+ + " DefaultUnmodified this) ",
- "<T extends java.lang.Runnable> void accept("
- + "@RcvrA DefaultUnmodified this,\n"
- + " T r)\n"
- + " throws java.lang.Exception");
+ "<T extends "
+ + "java.lang.Runnable> void "
+ + " accept( "
+ + "@RcvrA "
+ + "DefaultUnmodified this,\nT r)\n"
+ + " throws "
+ + "java.lang.Exception ");
checkOutput("typeannos/PublicModified.html", true,
- "public final java.lang.String nonVoid"
- + "("
- + "@RcvrA PublicModified this)",
+ "public final "
+ + " java.lang.String "
+ + "nonVoid( @RcvrA PublicModified this)"
+ + " ",
- "public final <T extends java.lang.Runnable> "
- + "void accept(@RcvrA PublicModified this,\n"
- + " T r)\n"
- + " throws java.lang.Exception ");
+ "public final "
+ + " <T extends java.lang.Runnable> "
+ + " void accept"
+ + "( @RcvrA PublicModified this,\n"
+ + "T r)\n throws "
+ + " java.lang.Exception ");
checkOutput("typeannos/WithValue.html", true,
- "<T extends java.lang.Runnable> void accept("
- + "@RcvrB("
- + "\"m\") WithValue this,\n"
- + " T r)\n"
- + " throws java.lang.Exception");
+ "<T extends "
+ + "java.lang.Runnable> void "
+ + " accept( "
+ + "@RcvrB(\"m\")"
+ + " WithValue this,\nT r)\n"
+ + " throws "
+ + "java.lang.Exception ");
checkOutput("typeannos/WithFinal.html", true,
- "java.lang.String nonVoid(@RcvrB(\"m\") "
- + ""
- + "WithFinal afield) ");
+ "java.lang.String"
+ + " nonVoid( "
+ + "@RcvrB(\"m\") "
+ + "WithFinal"
+ + " afield) ");
checkOutput("typeannos/WithBody.html", true,
- "void field(@RcvrA WithBody this) ");
+ "void "
+ + " field( "
+ + "@RcvrA"
+ + " WithBody this) ");
checkOutput("typeannos/Generic2.html", true,
- "void test2(@RcvrA Generic2<X> this) ");
+ "void "
+ + " test2( "
+ + "@RcvrA"
+ + " Generic2<X> this) ");
// Test for repeated type annotations (RepeatedAnnotations.java).
@@ -393,84 +418,82 @@ public class TestTypeAnnotations extends JavadocTester {
// + "extends java.lang.Object");
checkOutput("typeannos/RepeatingOnConstructor.html", true,
- "@RepConstructorA @RepConstructorA\n@RepConstructorB @RepConstructorB\n"
- + "RepeatingOnConstructor() ",
+ "",
- "@RepConstructorA @RepConstructorA\n@RepConstructorB @RepConstructorB\n"
- + "RepeatingOnConstructor(int i,\n int j) ",
+ "",
- "@RepAllContextsA @RepAllContextsA\n"
- + "@RepAllContextsB @RepAllContextsB\n"
- + "RepeatingOnConstructor(int i,\n int j,\n"
- + " int k) ",
+ "",
- "RepeatingOnConstructor(@RepParameterA @RepParameterA @RepParameterB "
- + "@RepParameterB\n java.lang.String parameter,\n"
- + " @RepParameterA "
- + "@RepParameterA @RepParameterB "
- + "@RepParameterB\n java.lang.String "
- + ""
- + "@RepTypeUseA @RepTypeUseA @RepTypeUseB "
- + ""
- + "@RepTypeUseB ... vararg) "
+ ""
);
checkOutput("typeannos/RepeatingOnConstructor.Inner.html", true,
"Inner(java.lang.String parameter,\n"
- + " java.lang.String "
+ + "java.lang.String "
+ "@RepTypeUseA "
+ "@RepTypeUseA "
+ "@RepTypeUseB "
+ "@RepTypeUseB ... vararg)",
- "Inner("
- + "@RepTypeUseA @RepTypeUseA @RepTypeUseB "
- + "@RepTypeUseB RepeatingOnConstructor this,\n "
- + "@RepParameterA @RepParameterA @RepParameterB "
- + "@RepParameterB\n java.lang.String parameter,\n"
- + " "
- + "@RepParameterA @RepParameterA @RepParameterB "
- + "@RepParameterB\n java.lang.String @RepTypeUseA "
- + "@RepTypeUseA @RepTypeUseB @RepTypeUseB ... vararg)");
+ "Inner(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnConstructor this,\n"
+ + "@RepParameterA "
+ + "@RepParameterA "
+ + "@RepParameterB "
+ + "@RepParameterB\n"
+ + "java.lang.String parameter,\n@RepParameterA "
+ + "@RepParameterA "
+ + "@RepParameterB "
+ + "@RepParameterB\n"
+ + "java.lang.String "
+ + "@RepTypeUseA "
+ + "@RepTypeUseA "
+ + "@RepTypeUseB "
+ + "@RepTypeUseB ... vararg)");
checkOutput("typeannos/RepeatingOnField.html", true,
"(package private) java.lang.Integer\n"
@@ -519,57 +542,55 @@ public class TestTypeAnnotations extends JavadocTester {
+ "\"memberNameLink\">sa",
- ""
- + "@RepFieldA @RepFieldA\n@RepFieldB "
- + "@RepFieldB\njava.lang.Integer i1 ",
+ "",
- "@RepTypeUseA @RepTypeUseA "
- + ""
- + "@RepTypeUseB @RepTypeUseB java.lang.Integer i2 ",
+ "",
- ""
- + "@RepFieldA @RepFieldA\n@RepFieldB "
- + "@RepFieldB\n@RepTypeUseA @RepTypeUseA "
- + "@RepTypeUseB @RepTypeUseB java.lang.Integer i3 ",
+ "",
- ""
- + "@RepAllContextsA @RepAllContextsA\n"
- + "@RepAllContextsB @RepAllContextsB\n"
- + ""
- + "@RepAllContextsA @RepAllContextsA "
- + "@RepAllContextsB @RepAllContextsB java.lang.Integer i4 ",
+ "",
- "java.lang.String @RepTypeUseA @RepTypeUseA "
- + "@RepTypeUseB @RepTypeUseB [] "
- + "@RepTypeUseA @RepTypeUseA @RepTypeUseB "
- + "@RepTypeUseB [] sa ");
+ "");
checkOutput("typeannos/RepeatingOnMethod.html", true,
"(package private) java.lang.String\n | "
@@ -608,7 +629,7 @@ public class TestTypeAnnotations extends JavadocTester {
"test5"
- + "(java.lang.String parameter,\n java.lang.String "
+ "@RepTypeUseA @RepTypeUseA "
+ "@RepTypeUseB ... vararg)",
- ""
- + "@RepMethodA @RepMethodA\n@RepMethodB "
- + "@RepMethodB\njava.lang.String test1()",
+ "@RepMethodA "
+ + "@RepMethodA\n"
+ + "@RepMethodB "
+ + "@RepMethodB\n"
+ + "java.lang.String "
+ + "test1()",
""
+ "@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.String test2()",
+ + "title=\"annotation in typeannos\">@RepTypeUseB java.lang.String"
+ + " test2()",
- ""
- + "@RepMethodA @RepMethodA\n@RepMethodB "
- + "@RepMethodB\n@RepTypeUseA @RepTypeUseA "
- + "@RepTypeUseB @RepTypeUseB java.lang.String test3()",
+ "@RepMethodA "
+ + "@RepMethodA\n"
+ + "@RepMethodB "
+ + "@RepMethodB\n"
+ + "@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.String "
+ + "test3()",
- ""
- + "@RepAllContextsA @RepAllContextsA\n"
- + "@RepAllContextsB @RepAllContextsB\n"
- + "@RepAllContextsA @RepAllContextsA "
- + "@RepAllContextsB @RepAllContextsB java.lang.String test4()",
+ "@RepAllContextsA "
+ + "@RepAllContextsA\n"
+ + "@RepAllContextsB "
+ + "@RepAllContextsB\n"
+ + "@RepAllContextsA @RepAllContextsA @RepAllContextsB @RepAllContextsB java.lang.String "
+ + "test4()",
- "java.lang.String test5(@RepTypeUseA "
- + "@RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnMethod "
- + "this,\n @RepParameterA "
- + "@RepParameterA @RepParameterB "
- + "@RepParameterB\n java.lang.String parameter,\n"
- + " @RepParameterA @RepParameterA "
- + "@RepParameterB @RepParameterB\n "
- + "java.lang.String @RepTypeUseA @RepTypeUseA "
- + "@RepTypeUseB @RepTypeUseB ... vararg)");
+ "java.lang.String test5("
+ + "@RepTypeUseA "
+ + "@RepTypeUseA "
+ + "@RepTypeUseB "
+ + "@RepTypeUseB"
+ + " RepeatingOnMethod this,\n"
+ + "@RepParameterA "
+ + "@RepParameterA "
+ + "@RepParameterB "
+ + "@RepParameterB\n"
+ + "java.lang.String parameter,\n"
+ + "@RepParameterA "
+ + "@RepParameterA "
+ + "@RepParameterB "
+ + "@RepParameterB\n"
+ + "java.lang.String "
+ + "@RepTypeUseA "
+ + "@RepTypeUseA "
+ + "@RepTypeUseB "
+ + "@RepTypeUseB ... vararg)");
checkOutput("typeannos/RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod.html", true,
"(package private) <T> java.lang.String\n"
@@ -699,7 +714,9 @@ public class TestTypeAnnotations extends JavadocTester {
+ "test()",
- "java.lang.String test(java.lang.String "
+ + "test"
+ + "(@RepTypeUseA "
+ "@RepTypeUseA @RepTypeUseB T> this)");
checkOutput("typeannos/RepeatingOnVoidMethodDeclaration.html", true,
- ""
- + "@RepMethodA @RepMethodA\n@RepMethodB "
- + "@RepMethodB\nvoid test()");
+ "@RepMethodA "
+ + "@RepMethodA\n"
+ + "@RepMethodB "
+ + "@RepMethodB\n"
+ + "void "
+ + "test()");
}
}
diff --git a/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java b/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java
index 3e6e28922fc..e7c5dbb5062 100644
--- a/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java
+++ b/test/langtools/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java
@@ -54,7 +54,7 @@ public class TestTypeParameters extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg/C.html", true,
- " | <W extends java.lang.String,V extends "
+ "<W extends java.lang.String,\nV extends "
+ "java.util.List> java.lang.Object | ",
"<T> java.lang.Object");
diff --git a/test/langtools/jdk/javadoc/doclet/testVisibleMembers/TestVisibleMembers.java b/test/langtools/jdk/javadoc/doclet/testVisibleMembers/TestVisibleMembers.java
index 3d2ce8c9346..0b569ee881a 100644
--- a/test/langtools/jdk/javadoc/doclet/testVisibleMembers/TestVisibleMembers.java
+++ b/test/langtools/jdk/javadoc/doclet/testVisibleMembers/TestVisibleMembers.java
@@ -272,7 +272,7 @@ public class TestVisibleMembers extends JavadocTester {
checkOrder("p/C.html",
"METHOD DETAIL",
- "public", "void", "method()",
+ "public", "void", "method",
"See Also:",
"sub()",
"sub1()");
@@ -307,7 +307,7 @@ public class TestVisibleMembers extends JavadocTester {
checkOrder("p/C.html",
"METHOD DETAIL",
- "public", "void", "method()", "See Also:", "sub()", "I.sub1()",
+ "public", "void", "method", "See Also:", "sub()", "I.sub1()",
"public", "void", "m", "Method in C. See", "I.length()"
);
@@ -411,10 +411,10 @@ public class TestVisibleMembers extends JavadocTester {
checkOrder("p/C.html",
"METHOD DETAIL",
- "public", "void", "m()", "Method m in p.B",
- "public", "void", "n()", "Method n in p.A",
- "public", "void", "o()", "Description copied from class:", ">A<", "Method o in p.A",
- "public", "void", "p()", "Method p in p.B",
+ "public", "void", "m", "Method m in p.B",
+ "public", "void", "n", "Method n in p.A",
+ "public", "void", "o", "Description copied from class:", ">A<", "Method o in p.A",
+ "public", "void", "p", "Method p in p.B",
"END OF CLASS DATA");
checkOutput("p/C.html", false,
@@ -471,10 +471,10 @@ public class TestVisibleMembers extends JavadocTester {
checkOrder("p/C.html",
"METHOD DETAIL",
- "public", "void", "m()", "Method m in p.B",
- "public", "void", "n()", "Method n in p.A",
- "public", "void", "o()", "Description copied from class:", ">A<", "Method o in p.A",
- "public", "void", "p()", "Method p in p.B",
+ "public", "void", "m", "Method m in p.B",
+ "public", "void", "n", "Method n in p.A",
+ "public", "void", "o", "Description copied from class:", ">A<", "Method o in p.A",
+ "public", "void", "p", "Method p in p.B",
"END OF CLASS DATA");
checkOutput("p/C.html", false,
| |