# HG changeset patch # User ksrini # Date 1457993097 25200 # Node ID 890c250d8da8c3671d7264cb63b4cc00a58779f2 # Parent 4a95f4b1bd8bfce85dc02a593896749feab96c34 8071982: Update tests for revamped Doclet API 8071984: Update test cases for repeating and type annotations output in javadoc Reviewed-by: ksrini, bpatel Contributed-by: oleg.barbashov@oracle.com diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java --- a/langtools/test/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java Mon Mar 14 15:04:57 2016 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 4973609 8015249 8025633 8026567 6469561 + * @bug 4973609 8015249 8025633 8026567 6469561 8071982 * @summary Make sure that annotation types with 0 members does not have * extra HR tags. * @author jamieh @@ -42,7 +42,7 @@ @Test void test() { - javadoc("-d", "out", + javadoc("-d", "out-1", "-sourcepath", testSrc, "pkg"); checkExit(Exit.OK); @@ -90,5 +90,27 @@ + "

\n\n" + "

" + "" + "


"); + + javadoc("-d", "out-2", + "-linksource", + "-sourcepath", testSrc, + "pkg"); + checkExit(Exit.OK); + + checkOutput("src-html/pkg/AnnotationType.html", true, + "Source code", + "@Documented public @interface AnnotationType {"); + + checkOutput("src-html/pkg/AnnotationTypeField.html", true, + "Source code", + "@Documented public @interface AnnotationTypeField {"); + + checkOutput("pkg/AnnotationType.html", true, + "public @interface AnnotationType"); + + checkOutput("pkg/AnnotationTypeField.html", true, + "public @interface AnnotationTypeField"); } } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassCrossReferences/C.java --- a/langtools/test/jdk/javadoc/doclet/testClassCrossReferences/C.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testClassCrossReferences/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -26,6 +26,7 @@ * Cross link to inner class: {@link javax.swing.text.AbstractDocument.AttributeContext Link to AttributeContext innerclass}
* Cross link to class: {@link java.math.BigDecimal Link to external class BigDecimal}
* Cross link to member: {@link java.math.BigInteger#gcd(java.math.BigInteger) Link to external member gcd}
+ * Cross link to package: {@link javax.tools.SimpleJavaFileObject#URI Link to external member URI}
*/ public class C { diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java --- a/langtools/test/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4652655 4857717 8025633 8026567 + * @bug 4652655 4857717 8025633 8026567 8071982 * @summary This test verifies that class cross references work properly. * @author jamieh * @library ../lib @@ -42,9 +42,10 @@ @Test void test() { - final String uri = "http://java.sun.com/j2se/1.4/docs/api/"; + final String uri = "http://docs.oracle.com/javase/8/docs/api/"; javadoc("-d", "out", + "-Xdoclint:none", "-sourcepath", testSrc, "-linkoffline", uri, testSrc, testSrc("C.java")); @@ -59,6 +60,8 @@ + "title=\"class or interface in java.math\">Link to external class BigDecimal", "Link to external member gcd", + "Link to external member URI", "
\n" + "
Overrides:
\n" + "
toString in class java.lang.Object
\n" diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassCrossReferences/package-list --- a/langtools/test/jdk/javadoc/doclet/testClassCrossReferences/package-list Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testClassCrossReferences/package-list Mon Mar 14 15:04:57 2016 -0700 @@ -1,2 +1,3 @@ java.math +javax.tools javax.swing.text diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/TestClassDocCatalog.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/TestClassDocCatalog.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2016, 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 8071982 + * @summary Test for package-frame.html. + * @library ../lib + * @modules jdk.javadoc + * @build JavadocTester + * @run main TestClassDocCatalog + */ + +public class TestClassDocCatalog extends JavadocTester { + + public static void main(String... args) throws Exception { + TestClassDocCatalog tester = new TestClassDocCatalog(); + tester.runTests(); + } + + @Test + void test() { + javadoc("-d", "out", + testSrc("pkg1/EmptyAnnotation.java"), + testSrc("pkg1/EmptyClass.java"), + testSrc("pkg1/EmptyEnum.java"), + testSrc("pkg1/EmptyError.java"), + testSrc("pkg1/EmptyException.java"), + testSrc("pkg1/EmptyInterface.java"), + testSrc("pkg2/EmptyAnnotation.java"), + testSrc("pkg2/EmptyClass.java"), + testSrc("pkg2/EmptyEnum.java"), + testSrc("pkg2/EmptyError.java"), + testSrc("pkg2/EmptyException.java"), + testSrc("pkg2/EmptyInterface.java")); + checkExit(Exit.OK); + + checkOutput("overview-frame.html", true, + "
  • pkg1" + + "
  • \n
  • pkg2
  • "); + + checkOutput("pkg1/package-frame.html", true, + "
  • EmptyInterface" + + "
  • ", + "
  • EmptyClass
  • ", + "
  • EmptyEnum
  • ", + "
  • EmptyError
  • ", + "
  • EmptyAnnotation
  • "); + } +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyAnnotation.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyAnnotation.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2016, 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 pkg1; + +import java.lang.annotation.Documented; + +@Documented public @interface EmptyAnnotation { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyClass.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyClass.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg1; + +public class EmptyClass { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyEnum.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyEnum.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg1; + +public enum EmptyEnum { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyError.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyError.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg1; + +public class EmptyError extends Error { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyException.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg1; + +public class EmptyException extends Exception { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyInterface.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg1/EmptyInterface.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg1; + +public interface EmptyInterface { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyAnnotation.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyAnnotation.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2016, 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 pkg2; + +import java.lang.annotation.Documented; + +@Documented public @interface EmptyAnnotation { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyClass.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyClass.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg2; + +public class EmptyClass { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyEnum.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyEnum.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg2; + +public enum EmptyEnum { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyError.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyError.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg2; + +public class EmptyError extends Error { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyException.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg2; + +public class EmptyException extends Exception { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyInterface.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testClassDocCatalog/pkg2/EmptyInterface.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg2; + +public interface EmptyInterface { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java --- a/langtools/test/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4927552 8026567 + * @bug 4927552 8026567 8071982 * @summary * @author jamieh * @library ../lib @@ -50,6 +50,7 @@ "annotation_test1 passes", "annotation_test2 passes", "annotation_test3 passes", + "annotation_test4 passes.", "class_test1 passes", "class_test2 passes", "class_test3 passes", diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestAnnotationType.java --- a/langtools/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestAnnotationType.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestAnnotationType.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -39,4 +39,9 @@ * @deprecated annotation_test3 passes. */ int required(); + + /** + * @deprecated annotation_test4 passes. + */ + int field = 0; } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testGroupOption/C.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testGroupOption/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2016, 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. + */ + +public class C {} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testGroupOption/TestGroupOption.java --- a/langtools/test/jdk/javadoc/doclet/testGroupOption/TestGroupOption.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testGroupOption/TestGroupOption.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -25,7 +25,7 @@ * @test * @bug 4924383 * @summary Test to make sure the -group option does not cause a bad warning - * to be printed. + * to be printed. Test for the group defined using patterns. * @author jamieh * @library ../lib * @modules jdk.javadoc @@ -42,7 +42,7 @@ @Test void test1() { - //Make sure the warning is not printed when -group is used correctly. + // Make sure the warning is not printed when -group is used correctly. javadoc("-d", "out-1", "-sourcepath", testSrc, "-group", "Package One", "pkg1", @@ -55,11 +55,29 @@ "-group"); } - @Test + // @Test + // @ignore 8149402 + // Make sure the "Other packages" section is printed and the header for empty section is not. + // Make sure that the headers of group that is defined using patterns are printed. void test2() { - //Make sure the warning is printed when -group is not used correctly. javadoc("-d", "out-2", "-sourcepath", testSrc, + "-group", "Group pkg*", "pkg*", + "-group", "Group abc*", "abc*", + "-group", "Empty group", "qwerty*", + "-group", "Group a*", "a*", + "pkg1", "pkg2", "pkg3", "abc1", "abc2", "abc3", "other", testSrc("C.java")); + checkExit(Exit.OK); + + checkOutput("overview-summary.html", true, "Group pkg*", "Group abc*", "Other Packages"); + checkOutput("overview-summary.html", false, "Empty group", "Group a*"); + } + + @Test + void test3() { + // Make sure the warning is printed when -group is not used correctly. + javadoc("-d", "out-3", + "-sourcepath", testSrc, "-group", "Package One", "pkg1", "-group", "Package One", "pkg2", "-group", "Package One", "pkg3", diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testGroupOption/abc1/C.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testGroupOption/abc1/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2016, 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 abc1; + +public class C {} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testGroupOption/abc2/C.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testGroupOption/abc2/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2016, 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 abc2; + +public class C {} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testGroupOption/abc3/C.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testGroupOption/abc3/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2016, 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 abc3; + +public class C {} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testGroupOption/other/C.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testGroupOption/other/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2016, 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 other; + +public class C {} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testHelpOption/TestHelpOption.java --- a/langtools/test/jdk/javadoc/doclet/testHelpOption/TestHelpOption.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testHelpOption/TestHelpOption.java Mon Mar 14 15:04:57 2016 -0700 @@ -64,6 +64,7 @@ "-sourcepath", testSrc, "-nohelp", testSrc("Sample.java")); + checkOutput("Sample.html", false, "
  • Help
  • "); checkExit(Exit.OK); } @@ -76,6 +77,8 @@ checkExit(Exit.OK); checkOutput("Sample.html", true, "
  • Help
  • "); + checkOutput("test-help.html", true, + "Help, help."); } @Test @@ -135,7 +138,15 @@ "-sourcetab ", "-keywords ", "-stylesheetfile ", - "-docencoding "); + "-docencoding ", + "-html4 ", + "-html5 ", + "-top ", + "-author ", + "-noqualifier ", + "-nosince ", + "-notimestamp ", + "-sourcetab "); checkOutput("Sample.html", !withOption, "
  • Help
  • "); diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testIndex/TestIndex.java --- a/langtools/test/jdk/javadoc/doclet/testIndex/TestIndex.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testIndex/TestIndex.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4852280 4517115 4973608 4994589 8026567 + * @bug 4852280 4517115 4973608 4994589 8026567 8071982 * @summary Perform tests on index.html file. * Also test that index-all.html has the appropriate output. * Test for unnamed package in index. @@ -75,6 +75,8 @@ + "- Static variable in class pkg." + "C\n" + "
     
    \n" - + "
    "); + + "", + "
    Enum" + + " - Search tag in pkg.Coin
    "); } } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testIndex/pkg/Coin.java --- a/langtools/test/jdk/javadoc/doclet/testIndex/pkg/Coin.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testIndex/pkg/Coin.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2016, 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 @@ -24,14 +24,13 @@ package pkg; /** - * This is a sample Enum. - * + * This is a sample {@index Enum} Enum. * @author Jamie Ho */ public enum Coin { - Penny, Nickel, Dime; + Penny(1), Nickel(2), Dime(3); -public Coin(int i) {} +Coin(int i) {} } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java --- a/langtools/test/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4732864 6280605 7064544 8014636 8016328 8025633 + * @bug 4732864 6280605 7064544 8014636 8016328 8025633 8071982 * @summary Make sure that you can link from one member to another using * non-qualified name, furthermore, ensure the right one is linked. * @author jamieh @@ -54,7 +54,8 @@ + " Unqualified Link2: C.InnerC.
    \n" + " Qualified Link: method(pkg.C.InnerC, pkg.C.InnerC2).
    \n" + " Unqualified Link: method(C.InnerC, C.InnerC2).
    \n" - + " Unqualified Link: method(InnerC, InnerC2).
    "); + + " Unqualified Link: method(InnerC, InnerC2).
    \n" + + " Package Link: pkg.
    "); checkOutput("pkg/C.InnerC.html", true, "Link to member in outer class: C.MEMBER
    \n" diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testLinkTaglet/checkPkg/B.java --- a/langtools/test/jdk/javadoc/doclet/testLinkTaglet/checkPkg/B.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testLinkTaglet/checkPkg/B.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -27,10 +27,8 @@ * @see A */ public class B { - - /** + /** * @see A#m() */ - public void m2(); - + public void m2() {}; } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testLinkTaglet/pkg/C.java --- a/langtools/test/jdk/javadoc/doclet/testLinkTaglet/pkg/C.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testLinkTaglet/pkg/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2016, 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,6 +30,9 @@ * Qualified Link: {@link #method(pkg.C.InnerC, pkg.C.InnerC2)}.
    * Unqualified Link: {@link #method(C.InnerC, C.InnerC2)}.
    * Unqualified Link: {@link #method(InnerC, InnerC2)}.
    + * Package Link: {@link pkg}.
    + * + * */ public class C { diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testNavigation/TestNavigation.java --- a/langtools/test/jdk/javadoc/doclet/testNavigation/TestNavigation.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testNavigation/TestNavigation.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -42,22 +42,25 @@ @Test void test() { - javadoc("-d", "out", + javadoc("-d", "out", "-overview", testSrc("overview.html"), "-sourcepath", testSrc, "pkg"); checkExit(Exit.OK); checkOutput("pkg/A.html", true, "
  • Prev Class
  • ", - "Next Class"); + "Next Class", + "
  • Overview
  • "); checkOutput("pkg/C.html", true, "Prev Class", - "Next Class"); + "Next Class", + "
  • Overview
  • "); checkOutput("pkg/E.html", true, "Prev Class", - "Next Class"); + "Next Class", + "
  • Overview
  • "); checkOutput("pkg/I.html", true, "Prev Class", @@ -66,6 +69,7 @@ "
    Skip navigation links
    \n" + "\n" + "\n" - + ""); + + "", + "
  • Overview
  • "); } } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testNavigation/overview.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testNavigation/overview.html Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,14 @@ + + + + + + +This document is generated from sample source code and HTML files +with examples of a wide variety of Java language constructs: packages, +subclasses, subinterfaces, nested classes, nested interfaces, +inheriting from other packages, constructors, fields, +methods, and so forth. + + + diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testOptions/TestOptions.java --- a/langtools/test/jdk/javadoc/doclet/testOptions/TestOptions.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testOptions/TestOptions.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, 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 @@ -23,8 +23,8 @@ /* * @test - * @bug 4749567 - * @summary Test the output for -header and -footer options. + * @bug 4749567 8071982 + * @summary Test the output for -header, -footer, -nooverview, -nodeprecatedlist, -nonavbar, -notree, -stylesheetfile options. * @author Bhavesh Patel * @library ../lib * @modules jdk.javadoc @@ -32,6 +32,8 @@ * @run main TestOptions */ +import java.io.File; + public class TestOptions extends JavadocTester { public static void main(String... args) throws Exception { @@ -40,8 +42,8 @@ } @Test - void test() { - javadoc("-d", "out", + void testHeaderFooter() { + javadoc("-d", "out-1", "-header", "Test header", "-footer", "Test footer", "-sourcepath", testSrc, @@ -52,5 +54,163 @@ "
    Test header
    ", "
    Test footer
    "); } + + @Test + void testNoOverview() { + javadoc("-d", "out-4", + "-nooverview", + "-sourcepath", testSrc, + "pkg", "deprecated"); + + checkExit(Exit.OK); + + checkFiles(false, "overview-summary.html"); + } + + @Test + void testNoDeprecatedList() { + javadoc("-d", "out-5", + "-nodeprecatedlist", + "-sourcepath", testSrc, + "deprecated"); + checkExit(Exit.OK); + + checkFiles(false, "deprecated-list.html"); + } + + @Test + void testNoNavbar() { + javadoc("-d", "out-6", + "-nonavbar", + "-bottom", "Bottom text", + "-sourcepath", testSrc, + "pkg"); + checkExit(Exit.OK); + + checkOutput("pkg/Foo.html", false, "navbar"); + checkOutput("pkg/Foo.html", true, "Bottom text"); + } + + @Test + void testNoTree() { + javadoc("-d", "out-7", + "-notree", + "-sourcepath", testSrc, + "pkg"); + checkExit(Exit.OK); + + checkFiles(false, "overview-tree.html"); + checkFiles(false, "pkg/package-tree.html"); + checkOutput("pkg/Foo.html", false, "
  • Tree
  • "); + } + + @Test + void testStylesheetFile() { + javadoc("-d", "out-8", + "-stylesheetfile", new File(testSrc, "custom-stylesheet.css").getAbsolutePath(), + "-sourcepath", testSrc, + "pkg"); + checkExit(Exit.OK); + + checkOutput("custom-stylesheet.css", true, "Custom javadoc style sheet"); + checkOutput("pkg/Foo.html", true, ""); + } + + @Test + void testLinkSource() { + javadoc("-d", "out-9", + "-linksource", + "-javafx", + "-sourcepath", testSrc, + "-package", + "linksource"); + checkExit(Exit.OK); + + checkOutput("linksource/AnnotationTypeField.html", true, + "
    @Documented\npublic @interface "
    +                + "AnnotationTypeField
    ", + "

    DEFAULT_NAME

    \n
    static final java.lang.String "
    +                + ""
    +                + "DEFAULT_NAME
    ", + "

    name

    \n
    java.lang.String name
    "); + + checkOutput("src-html/linksource/AnnotationTypeField.html", true, + "Source code", + "031" + + "@Documented public @interface AnnotationTypeField {"); + + 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", + "031 " + + "public Object someProperty() {"); + + checkOutput("linksource/SomeClass.html", true, + "
    public class "
    +                + "SomeClass\nextends java.lang.Object
    ", + "
    public int "
    +                + "field
    ", + "
    public "
    +                + "SomeClass()
    ", + "
    public int "
    +                + "method()
    "); + + checkOutput("src-html/linksource/SomeClass.html", true, + "Source code", + "029" + + "public class SomeClass {", + "031 " + + "public int field;", + "033 " + + "public SomeClass() {", + "036 " + + "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,", + "030 VALUE2"); + } + + @Test + void testNoQualifier() { + javadoc("-d", "out-10", + "-noqualifier", "pkg", + "-sourcepath", testSrc, + "pkg", "deprecated"); + checkExit(Exit.OK); + + checkOutput("pkg/Foo.html", true, + "
  • Foo
  • "); + checkOutput("deprecated/Foo.html", true, + "
  • deprecated.Foo
  • "); + + javadoc("-d", "out-10a", + "-noqualifier", "all", + "-sourcepath", testSrc, + "pkg", "deprecated"); + checkExit(Exit.OK); + + checkOutput("pkg/Foo.html", true, + "
  • Foo
  • "); + checkOutput("deprecated/Foo.html", true, + "
  • Foo
  • "); + } } - diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testOptions/custom-stylesheet.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testOptions/custom-stylesheet.css Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,751 @@ +/* Custom javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +a[name]:before, a[name]:target { + content:""; + display:block; + height:120px; + margin:-120px 0 0; +} +a[id]:before, a[id]:target { + padding-top:129px; + margin-top:-129px; + color:red; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.fixedNav { + position:fixed; + width:100%; + z-index:999; + background-color:#ffffff; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.navListSearch { + float:right; + margin:0 0 0 0; + padding:0; +} +ul.navListSearch li { + list-style:none; + float:right; + padding: 5px 6px; + text-transform:uppercase; +} +ul.navListSearch li span { + position:relative; + right:-16px; +} +ul.subNavList li { + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexNav { + margin:10px; + position:relative; +} +.indexNav ul { + padding:0; + margin:0; +} +.indexNav ul li { + display:inline; + list-style-type:none; + padding-right:10px; +} +.indexNav h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; + padding-top:5.4em; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink, .searchTagLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2 { + padding-bottom:0px; +} +/* +IFRAME specific styles +*/ +.mainContainer { + margin:0 auto; + padding:0; + height:100%; + width:100%; + position:fixed; + top:0; + left:0; +} +.leftContainer { + height:100%; + position:fixed; + width:320px; +} +.leftTop { + position:relative; + float:left; + width:315px; + top:0; + left:0; + height:30%; + border-right:6px solid #ccc; + border-bottom:6px solid #ccc; +} +.leftBottom { + position:relative; + float:left; + width:315px; + bottom:0; + left:0; + height:70%; + border-right:6px solid #ccc; + border-top:1px solid #000; +} +.rightContainer { + position:absolute; + left:320px; + top:0; + bottom:0; + height:100%; + right:0; + border-left:1px solid #000; +} +.rightIframe { + margin:0; + padding:0; + height:100%; + right:30px; + width:100%; + overflow:visible; + margin-bottom:30px; +} +/* +HTML5 specific styles +*/ +main, nav, header, footer, section { + display:block; +} +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.resultItem { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.resultHighlight { + font-weight:bold; +} +#search { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; +} +#reset { + background-color: rgb(255,255,255); + border:0 none; + width:16px; + height:17px; + position:relative; + left:-2px; + background-image:url('resources/x.png'); + background-repeat:no-repeat; + background-size:12px; + background-position:center; +} +.watermark { + color:#888; +} +.searchTagDescResult { + font-style:italic; + font-size:11px; +} +.searchTagHolderResult { + font-style:italic; + font-size:12px; +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testOptions/deprecated/Foo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testOptions/deprecated/Foo.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2016, 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 deprecated; + +import pkg.*; + +@Deprecated +public class Foo {} + diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testOptions/help.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testOptions/help.html Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,242 @@ + + + + + +API Help + + + + + + + + + + + + + + +
    + +
    + + + + + + + +
    Test header
    +
    + + +
    +
    +

    How This API Document Is Organized (custom help file)

    +
    This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
    +
    +
    + +This help file applies to API documentation generated using the standard doclet.
    + +
    + + + + + + + +
    Test footer
    +
    + + + + diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testOptions/linksource/AnnotationTypeField.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testOptions/linksource/AnnotationTypeField.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2016, 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 linksource; + +import java.lang.annotation.*; + +/** + * This is just a test for annotation type fields. + */ +@Documented public @interface AnnotationTypeField { + String DEFAULT_NAME = "test"; + + String name() default DEFAULT_NAME; +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testOptions/linksource/Properties.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testOptions/linksource/Properties.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2016, 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 linksource; + +/** + * This is just a test for property writer. + */ +public class Properties { + + public Object someProperty() { + return null; + } +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testOptions/linksource/SomeClass.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testOptions/linksource/SomeClass.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2016, 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 linksource; + +/** + * This is just a test for constructor, field and method writers. + */ +public class SomeClass { + + public int field; + + public SomeClass() { + } + + public int method() { + return 0; + } +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testOptions/linksource/SomeEnum.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testOptions/linksource/SomeEnum.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2016, 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 linksource; + +/** + * This is just a test for enum constant writers. + */ +public enum SomeEnum { + VALUE1, + VALUE2 +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java --- a/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 8141492 + * @bug 8141492 8071982 * @summary Test the search feature of javadoc. * @author bpatel * @library ../lib @@ -234,6 +234,12 @@ checkOutput("index-all.html", expectedOutput, "
    " + "phrase with spaces - Search tag in pkg
    ", + "
    " + + "pkg - Search tag in pkg
    ", + "
    " + + "pkg2.5 - Search tag in pkg
    ", + "
    " + + "r - Search tag in pkg
    ", "
    " + "search phrase - Search tag in pkg1.RegClass
    ", "
    " @@ -290,7 +296,14 @@ + "SingleWord - Search tag in pkg
    "); checkOutput("index-files/index-9.html", true, "
    " - + "phrase with spaces - Search tag in pkg
    "); + + "phrase with spaces - Search tag in pkg", + "
    " + + "pkg - Search tag in pkg
    ", + "
    " + + "pkg2.5 - Search tag in pkg
    "); + checkOutput("index-files/index-11.html", true, + "
    " + + "r - Search tag in pkg
    "); checkOutput("index-files/index-8.html", true, "
    nested {@index nested_tag_test} - " @@ -309,6 +322,12 @@ checkOutput("index-all.html", false, "
    " + "phrase with spaces - Search tag in pkg
    ", + "
    " + + "pkg - Search tag in pkg
    ", + "
    " + + "pkg2.5 - Search tag in pkg
    ", + "
    " + + "r - Search tag in pkg
    ", "
    " + "search phrase - Search tag in pkg1.RegClass
    ", "
    " diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSearch/pkg/AnotherClass.java --- a/langtools/test/jdk/javadoc/doclet/testSearch/pkg/AnotherClass.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testSearch/pkg/AnotherClass.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -72,7 +72,7 @@ * @param param some parameter. * @return a test object. */ - public Class method(pkg1.RegClass param) { + public pkg1.RegClass method(pkg1.RegClass param) { return param; } } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSearch/pkg/package-info.java --- a/langtools/test/jdk/javadoc/doclet/testSearch/pkg/package-info.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testSearch/pkg/package-info.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -23,6 +23,9 @@ /** * Test package. Testing search tag for package. Single {@index SingleWord} search tag. - * Search {@index "phrase with spaces"}. + * Search tag 1 {@index "phrase with spaces"}. + * Search tag 2 {@index "pkg"}. + * Search tag 3 {@index "pkg2.5"}. + * Search tag 5 {@index "r"}. */ package pkg; diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSearch/pkgfx/C.java --- a/langtools/test/jdk/javadoc/doclet/testSearch/pkgfx/C.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testSearch/pkgfx/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -60,24 +60,24 @@ public final void setRate(double value) {} - public final double getRate() {} + public final double getRate() {return 0.0;} - public final DoubleProperty rateProperty() {} + public final DoubleProperty rateProperty() {return null;} private BooleanProperty paused; public final void setPaused(boolean value) {} - public final double isPaused() {} + public final double isPaused() {return 0.0;} class DoubleProperty {} class BooleanProperty {} - public final BooleanProperty setTestMethodProperty() {} + public final BooleanProperty setTestMethodProperty() {return null;} private class Inner { - private BooleanProperty testMethodProperty() {} + private BooleanProperty testMethodProperty() {return null;} /** * Defines the direction/speed at which the {@code Timeline} is expected to @@ -88,8 +88,8 @@ public final void setRate(double value) {} - public final double getRate() {} + public final double getRate() {return 0.0;} - public final DoubleProperty rateProperty() {} + public final DoubleProperty rateProperty() {return null;} } } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSerializedForm/ExternalizedForm.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testSerializedForm/ExternalizedForm.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2016, 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. + */ + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +public class ExternalizedForm implements Externalizable { + + /** + * @throws IOException when there is an I/O error. + */ + public void writeExternal(ObjectOutput oo) throws IOException {} + + /** + * @throws IOException when there is an I/O error. + * @throws ClassNotFoundException if no class found. + * @serialData This is a serial data comment. + */ + public void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException {} +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSerializedForm/SerializedForm.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testSerializedForm/SerializedForm.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2016, 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. + */ + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.ObjectStreamField; +import java.io.Serializable; + +public class SerializedForm implements Serializable { + + /** + * @serialField name String a test + * @see TestSerializedForm + */ + @Deprecated + private static final ObjectStreamField[] serialPersistentFields = { + new ObjectStreamField("i", int.class), + new ObjectStreamField("count", Integer.TYPE), + new ObjectStreamField("name", String.class) + }; + + /** + * The entry point of the test. + * @param args the array of command line arguments. + */ + + /** + * @param s ObjectInputStream. + * @throws IOException when there is an I/O error. + * @serial + */ + private void readObject(ObjectInputStream s) throws IOException {} + + /** + * @param s ObjectOutputStream. + * @throws IOException when there is an I/O error. + * @serial + */ + private void writeObject(ObjectOutputStream s) throws IOException {} + + /** + * @throws IOException when there is an I/O error. + * @serialData This is a serial data comment. + * @return an object. + */ + protected Object readResolve() throws IOException {return null;} + + /** + * @throws IOException when there is an I/O error. + * @serialData This is a serial data comment. + * @return an object. + */ + protected Object writeReplace() throws IOException {return null;} + + /** + * @throws IOException when there is an I/O error. + * @serialData This is a serial data comment. + * @return an object. + */ + protected Object readObjectNoData() throws IOException { + return null; + } +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java --- a/langtools/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4341304 4485668 4966728 8032066 + * @bug 4341304 4485668 4966728 8032066 8071982 * @summary Test that methods readResolve and writeReplace show * up in serialized-form.html the same way that readObject and writeObject do. * If the doclet includes readResolve and writeReplace in the serialized-form @@ -41,7 +41,7 @@ import java.io.*; -public class TestSerializedForm extends JavadocTester implements Serializable { +public class TestSerializedForm extends JavadocTester { public static void main(String... args) throws Exception { TestSerializedForm tester = new TestSerializedForm(); tester.runTests(); @@ -50,18 +50,23 @@ // tester.printSummary(); } - @Test + // @ignore 8146022 + // @Test void testDefault() { - javadoc("-d", "out-default", + javadoc("-d", "out-default", "-serialwarn", "-Xdoclint:none", "-sourcepath", testSrc, - testSrc("TestSerializedForm.java"), "pkg1"); + testSrc("SerializedForm.java"), testSrc("ExternalizedForm.java"), "pkg1"); checkExit(Exit.OK); checkOutput("serialized-form.html", true, "protected java.lang.Object readResolve()", "protected java.lang.Object writeReplace()", "protected java.lang.Object readObjectNoData()", - "See Also", + "

    Serialization Overview

    \n
      \n" + + "
    • \n
      " + + "Deprecated. 
      \n" + + "
      \n
      See Also:
      \n" + + "
      TestSerializedForm
      \n
      ", "

      Class pkg1.NestedInnerClass.InnerClass.ProNestedInnerClass " + "extends java.lang.Object implements Serializable

      ", "

      Class pkg1.PrivateIncludeInnerClass.PriInnerClass extends " @@ -86,7 +91,7 @@ javadoc("-private", "-d", "out-private", "-sourcepath", testSrc, - testSrc("TestSerializedForm.java"), "pkg1"); + testSrc("SerializedForm.java"), testSrc("ExternalizedForm.java"), "pkg1"); checkExit(Exit.OK); checkOutput("serialized-form.html", true, @@ -109,53 +114,4 @@ + "title=\"class in pkg1\">pkg1.PublicExcludeInnerClass.PubInnerClass " + "extends java.lang.Object implements Serializable

      "); } - - /** - * @serial - * @see TestSerializedForm - */ - public final int SERIALIZABLE_CONSTANT = 1; - - /** - * The entry point of the test. - * @param args the array of command line arguments. - */ - - /** - * @param s ObjectInputStream. - * @throws IOException when there is an I/O error. - * @serial - */ - private void readObject(ObjectInputStream s) throws IOException {} - - /** - * @param s ObjectOutputStream. - * @throws IOException when there is an I/O error. - * @serial - */ - private void writeObject(ObjectOutputStream s) throws IOException {} - - /** - * @throws IOException when there is an I/O error. - * @serialData This is a serial data comment. - * @return an object. - */ - protected Object readResolve() throws IOException {return null;} - - /** - * @throws IOException when there is an I/O error. - * @serialData This is a serial data comment. - * @return an object. - */ - protected Object writeReplace() throws IOException {return null;} - - /** - * @throws IOException when there is an I/O error. - * @serialData This is a serial data comment. - * @return an object. - */ - protected Object readObjectNoData() throws IOException { - return null; - } - } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSimpleTag/C.java --- a/langtools/test/jdk/javadoc/doclet/testSimpleTag/C.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testSimpleTag/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -28,4 +28,10 @@ * @tag-with-hyphens a tag that contains hyphens. */ -public class C {} +public class C { + /** + * @param arg this is an int argument. + */ + public void m(int arg) { + } +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testSimpleTag/TestSimpleTag.java --- a/langtools/test/jdk/javadoc/doclet/testSimpleTag/TestSimpleTag.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testSimpleTag/TestSimpleTag.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4695326 4750173 4920381 8078320 + * @bug 4695326 4750173 4920381 8078320 8071982 * @summary Test the declaration of simple tags using -tag. Verify that * "-tag name" is a shortcut for "-tag name:a:Name:". Also verity that * you can escape the ":" character with a back slash so that it is not @@ -46,6 +46,7 @@ void test() { javadoc("-d", "out", "-sourcepath", testSrc, + "-tag", "param", "-tag", "todo", "-tag", "ejb\\:bean:a:EJB Beans:", "-tag", "regular:a:Regular Tag:", @@ -57,6 +58,8 @@ "Todo:", "EJB Beans:", "Regular Tag:", - "Tag-With-Hyphens:"); + "Tag-With-Hyphens:", + "
      Parameters:
      \n" + + "
      arg - this is an int argument.
      "); } } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java --- a/langtools/test/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java Mon Mar 14 15:04:57 2016 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 8005091 8009686 8025633 8026567 6469562 + * @bug 8005091 8009686 8025633 8026567 6469562 8071982 8071984 * @summary Make sure that type annotations are displayed correctly * @author Bhavesh Patel * @library ../lib @@ -355,5 +355,369 @@ checkOutput("typeannos/Generic2.html", true, "
      void test2(@RcvrA Generic2<X> this)
      "); + + + // Test for repeated type annotations (RepeatedAnnotations.java). + checkOutput("typeannos/RepeatingAtClassLevel.html", true, + "
      @RepTypeA @RepTypeA\n"
      +                + "@RepTypeB @RepTypeB\nclass RepeatingAtClassLevel\nextends "
      +                + "java.lang.Object
      "); + +// @ignore 8146008 +// checkOutput("typeannos/RepeatingAtClassLevel2.html", true, +// "
      @RepTypeUseA @RepTypeUseA\n@RepTypeUseB @RepTypeUseB\nclass RepeatingAtClassLevel2\nextends "
      +//                + "java.lang.Object
      "); +// +// checkOutput("typeannos/RepeatingAtClassLevel2.html", true, +// "
      @RepAllContextsA @RepAllContextsA\n@RepAllContextsB @RepAllContextsB\n"
      +//                + "class RepeatingAtClassLevel3\n"
      +//                + "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 " + + "@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" + + "i1", + + "(package private) @RepTypeUseA " + + "@RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.Integer\n" + + "i2", + + "(package private) @RepTypeUseA @RepTypeUseA " + + "@RepTypeUseB @RepTypeUseB java.lang.Integer" + + "\n" + + "i3", + + "(package private) @RepAllContextsA @RepAllContextsA " + + "@RepAllContextsB @RepAllContextsB java.lang.Integer" + + "\n" + + "i4", + + "(package private) java.lang.String @RepTypeUseA " + + "@RepTypeUseA @RepTypeUseB @RepTypeUseB [] " + + "@RepTypeUseA @RepTypeUseA @RepTypeUseB " + + "@RepTypeUseB []\nsa", + + "
      "
      +                + "@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\ntest1()", + + "(package private) @RepTypeUseA " + + "@RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.String" + + "\n" + + "test2" + + "()", + + "(package private) @RepTypeUseA " + + "@RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.String" + + "\n" + + "test3" + + "()", + + "(package private) @RepAllContextsA " + + "@RepAllContextsA @RepAllContextsB " + + "@RepAllContextsB java.lang.String\n" + + "test4()", + + "test5" + + "(java.lang.String parameter,\n java.lang.String " + + "@RepTypeUseA @RepTypeUseA @RepTypeUseB " + + "@RepTypeUseB ... vararg)", + + "" + + "@RepMethodA @RepMethodA\n@RepMethodB " + + "@RepMethodB\njava.lang.String test1()", + + "" + + "@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB java.lang.String test2()", + + "" + + "@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()", + + "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" + + "genericMethod(T t)", + + "(package private) <T> java.lang.String\n" + + "genericMethod2(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T t)", + + "(package private) java.lang.String\n" + + "test()", + + "java.lang.String test(@RepTypeUseA " + + "@RepTypeUseA @RepTypeUseB @RepTypeUseB " + + "RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod<" + + "@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T> this)"); + + checkOutput("typeannos/RepeatingOnVoidMethodDeclaration.html", true, + "" + + "@RepMethodA @RepMethodA\n@RepMethodB " + + "@RepMethodB\nvoid test()"); } } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/RepeatedAnnotations.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/RepeatedAnnotations.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,346 @@ +/* + * Copyright (c) 2016, 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 RepeatingA 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 typeannos; + +import java.lang.annotation.*; +import static java.lang.annotation.ElementType.*; + +/* + * This class is partially replicated from test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java; CombinationsTargetTest2.java; CombinationsTargetTest3.java + */ +@RepTypeA @RepTypeA @RepTypeB @RepTypeB class RepeatingAtClassLevel { +} + +@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB class RepeatingAtClassLevel2 { +} + +@RepAllContextsA @RepAllContextsA @RepAllContextsB @RepAllContextsB class RepeatingAtClassLevel3 { +} + +class RepeatingOnConstructor { + + @RepConstructorA @RepConstructorA @RepConstructorB @RepConstructorB + RepeatingOnConstructor() { + } + + @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnConstructor(int i) { + } + + @RepConstructorA @RepConstructorA @RepConstructorB @RepConstructorB + @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnConstructor(int i, int j) { + } + + @RepAllContextsA @RepAllContextsA @RepAllContextsB @RepAllContextsB RepeatingOnConstructor(int i, int j, int k) { + } + + RepeatingOnConstructor(@RepParameterA @RepParameterA @RepParameterB @RepParameterB String parameter, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB ... vararg) { + } + + class Inner { + Inner(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnConstructor RepeatingOnConstructor.this, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String parameter, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB ... vararg) { + } + } +} + +class RepeatingOnField { + @RepFieldA @RepFieldA @RepFieldB @RepFieldB + Integer i1; + + @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB Integer i2; + + @RepFieldA @RepFieldA @RepFieldB @RepFieldB + @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB Integer i3; + + @RepAllContextsA @RepAllContextsA @RepAllContextsB @RepAllContextsB Integer i4; + + String @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB [] @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB [] sa = null; +} + +class RepeatingOnMethod { + + @RepMethodA @RepMethodA @RepMethodB @RepMethodB + String test1() { + return null; + } + + @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB String test2() { + return null; + } + + @RepMethodA @RepMethodA @RepMethodB @RepMethodB + @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB String test3() { + return null; + } + + @RepAllContextsA @RepAllContextsA @RepAllContextsB @RepAllContextsB String test4() { + return null; + } + + String test5(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnMethod this, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String parameter, @RepParameterA @RepParameterA @RepParameterB @RepParameterB String @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB ... vararg) { + return null; + } +} + +class RepeatingOnTypeParametersBoundsTypeArgumentsOnClassDecl <@RepTypeParameterA @RepTypeParameterA @RepTypeParameterB @RepTypeParameterB T extends @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB Object> { + + String genericMethod(T t) { + return null; + } +} + +class RepeatingOnTypeParametersBoundsTypeArgumentsOnClassDecl2 <@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T extends @RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB Object> { + + String genericMethod(T t) { + return null; + } +} + +class RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod { + + String test(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB RepeatingOnTypeParametersBoundsTypeArgumentsOnMethod<@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T> this) { + return null; + } + + <@RepTypeParameterA @RepTypeParameterA @RepTypeParameterB @RepTypeParameterB T> String genericMethod(@RepParameterA @RepParameterA @RepParameterB @RepParameterB T t) { + return null; + } + + <@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T> String genericMethod2(@RepTypeUseA @RepTypeUseA @RepTypeUseB @RepTypeUseB T t) { + return null; + } +} + +class RepeatingOnVoidMethodDeclaration { + + @RepMethodA @RepMethodA @RepMethodB @RepMethodB void test() {} +} + +class RepeatingOnStaticMethodOfInterface { + + interface I { + static @RepMethodA @RepMethodA @RepMethodB @RepMethodB String m() { + return null; + } + } +} + +//------------------------------------------------------------------------------ +@Target({TYPE}) +@Repeatable(ContTypeA.class) +@Documented +@interface RepTypeA { } + +@Target({TYPE}) +@Documented +@interface ContTypeA { RepTypeA[] value(); } + +@Target({TYPE}) +@Repeatable(ContTypeB.class) +@Documented +@interface RepTypeB { } + +@Target({TYPE}) +@Documented +@interface ContTypeB { RepTypeB[] value(); } + +//------------------------------------------------------------------------------ +@Target({CONSTRUCTOR}) +@Repeatable(ContConstructorA.class) +@Documented +@interface RepConstructorA { } + +@Target({CONSTRUCTOR}) +@Documented +@interface ContConstructorA { RepConstructorA[] value(); } + +@Target({CONSTRUCTOR}) +@Repeatable(ContConstructorB.class ) +@Documented +@interface RepConstructorB { } + +@Target({CONSTRUCTOR}) +@Documented +@interface ContConstructorB { RepConstructorB[] value(); } + +//------------------------------------------------------------------------------ +@Target({METHOD}) +@Repeatable(ContMethodA.class) +@Documented +@interface RepMethodA {} + +@Target({METHOD}) +@Documented +@interface ContMethodA { + RepMethodA[] value(); +} + +@Target({METHOD}) +@Repeatable(ContMethodB.class) +@Documented +@interface RepMethodB {} + +@Target({METHOD}) +@Documented +@interface ContMethodB { + RepMethodB[] value(); +} + +//------------------------------------------------------------------------------ +@Target({FIELD}) +@Repeatable(ContFieldA.class) +@Documented +@interface RepFieldA {} + +@Target({FIELD}) +@Documented +@interface ContFieldA { + RepFieldA[] value(); +} + +@Target({FIELD}) +@Repeatable(ContFieldB.class) +@Documented +@interface RepFieldB {} + +@Target({FIELD}) +@Documented +@interface ContFieldB { + RepFieldB[] value(); +} + +//------------------------------------------------------------------------------ +@Target({TYPE_USE}) +@Repeatable(ContTypeUseA.class) +@Documented +@interface RepTypeUseA {} + +@Target({TYPE_USE}) +@Documented +@interface ContTypeUseA { + RepTypeUseA[] value(); +} + +@Target({TYPE_USE}) +@Repeatable(ContTypeUseB.class) +@Documented +@interface RepTypeUseB {} + +@Target({TYPE_USE}) +@Documented +@interface ContTypeUseB { + RepTypeUseB[] value(); +} + +//------------------------------------------------------------------------------ +@Target({TYPE_PARAMETER}) +@Repeatable(ContTypeParameterA.class) +@Documented +@interface RepTypeParameterA {} + +@Target({TYPE_PARAMETER}) +@Documented +@interface ContTypeParameterA { + RepTypeParameterA[] value(); +} + +@Target({TYPE_PARAMETER}) +@Repeatable(ContTypeParameterB.class) +@Documented +@interface RepTypeParameterB {} + +@Target({TYPE_PARAMETER}) +@Documented +@interface ContTypeParameterB { + RepTypeParameterB[] value(); +} + +//------------------------------------------------------------------------------ +@Target({PARAMETER}) +@Repeatable(ContParameterA.class) +@Documented +@interface RepParameterA {} + +@Target({PARAMETER}) +@Documented +@interface ContParameterA { + RepParameterA[] value(); +} + +@Target({PARAMETER}) +@Repeatable(ContParameterB.class) +@Documented +@interface RepParameterB {} + +@Target({PARAMETER}) +@Documented +@interface ContParameterB { + RepParameterB[] value(); +} + + +//------------------------------------------------------------------------------ +@Target({PACKAGE}) +@Repeatable(ContPackageA.class) +@Documented +@interface RepPackageA {} + +@Target({PACKAGE}) +@Documented +@interface ContPackageA { + RepPackageA[] value(); +} + +@Target({PACKAGE}) +@Repeatable(ContPackageB.class) +@Documented +@interface RepPackageB {} + +@Target({PACKAGE}) +@Documented +@interface ContPackageB { + RepPackageB[] value(); +} + +//------------------------------------------------------------------------------ +@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE}) +@Repeatable(ContAllContextsA.class) +@Documented +@interface RepAllContextsA {} + +@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE}) +@Documented +@interface ContAllContextsA { + RepAllContextsA[] value(); +} + +@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE}) +@Repeatable(ContAllContextsB.class) +@Documented +@interface RepAllContextsB {} + +@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE}) +@Documented +@interface ContAllContextsB { + RepAllContextsB[] value(); +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/TestUseOption.java --- a/langtools/test/jdk/javadoc/doclet/testUseOption/TestUseOption.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testUseOption/TestUseOption.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854 + * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854 8071982 * @summary A simple test to ensure class-use files are correct. * @author jamieh * @library ../lib @@ -121,6 +121,21 @@ "" + "withTypeParametersOfType" ); + checkOutput("pkg1/class-use/UsedInterface.html", true, + "Subinterfaces of " + + "UsedInterface in pkg1", + "interface \n" + + "SubInterface<T> " + ); + checkOutput("pkg1/class-use/UsedThrowable.html", true, + "Methods in pkg1 that throw " + + "UsedThrowable", + "void\nC1." + + "methodInC1ThrowsThrowable" + + "() " + ); } @Test @@ -128,7 +143,7 @@ javadoc("-d", "out-2", "-sourcepath", testSrc, "-use", - testSrc("C.java"), testSrc("UsedInC.java")); + testSrc("C.java"), testSrc("UsedInC.java"), "pkg3"); checkExit(Exit.OK); checkOutput("class-use/UsedInC.html", true, @@ -140,7 +155,9 @@ ); checkOutput("package-use.html", true, "" - + "UsedInC " + + "UsedInC ", + "<Unnamed>\n" + + " " ); } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C1.java --- a/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C1.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C1.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -47,10 +47,13 @@ return null; } + public void methodInC1ThrowsThrowable() throws UsedThrowable { + } + /* * this must not appear anywhere. */ UsedClass methodInC1Protected(List p){ - return p; + return p.get(0); } } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C9.java --- a/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C9.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/C9.java Mon Mar 14 15:04:57 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, 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 @@ -28,5 +28,10 @@ * */ public class C9 implements UsedInterface, UsedInterfaceA { + @Override public void doNothing(){} + + @Override + public void doNothingA() { + } } diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/SubInterface.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/SubInterface.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2016, 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. + */ + +/** + * An interface + * + */ + +package pkg1; + +public interface SubInterface extends UsedInterface { + + /** + * Does nothing + */ + void doNothingS(); +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/UsedThrowable.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg1/UsedThrowable.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2016, 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 pkg1; + +public class UsedThrowable extends Throwable { +} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/doclet/testUseOption/pkg3/C.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/langtools/test/jdk/javadoc/doclet/testUseOption/pkg3/C.java Mon Mar 14 15:04:57 2016 -0700 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2016, 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 pkg3; + +public class C {} diff -r 4a95f4b1bd8b -r 890c250d8da8 langtools/test/jdk/javadoc/tool/VerifyLocale.java --- a/langtools/test/jdk/javadoc/tool/VerifyLocale.java Wed Jul 05 21:27:27 2017 +0200 +++ b/langtools/test/jdk/javadoc/tool/VerifyLocale.java Mon Mar 14 15:04:57 2016 -0700 @@ -25,6 +25,7 @@ * @test * @bug 8035473 * @summary Verify that init method works correctly. + * @ignore 8149565 * @modules jdk.javadoc */ @@ -40,6 +41,10 @@ import jdk.javadoc.doclet.DocletEnvironment; public class VerifyLocale implements Doclet { + static String language; + static String country; + static String variant; + Locale locale; Reporter reporter; @@ -48,20 +53,29 @@ new java.io.File(System.getProperty("test.src", "."), "VerifyLocale.java"); - String[] argarray = { - // jumble the options in some weird order - "-doclet", "VerifyLocale", - "-locale", "ja", - "-docletpath", System.getProperty("test.classes", "."), - thisFile - }; - if (jdk.javadoc.internal.tool.Main.execute(argarray) != 0) - throw new Error("Javadoc encountered warnings or errors."); + for (Locale loc : Locale.getAvailableLocales()) { + language = loc.getLanguage(); + country = loc.getCountry(); + variant = loc.getVariant(); + if (!language.equals("")) { + String[] command_line = { + // jumble the options in some weird order + "-doclet", "VerifyLocale", + "-locale", language + (country.equals("") ? "" : ("_" + country + (variant.equals("") ? "" : "_" + variant))), + "-docletpath", System.getProperty("test.classes", "."), + thisFile + }; + if (jdk.javadoc.internal.tool.Main.execute(command_line) != 0) + throw new Error("Javadoc encountered warnings or errors."); + } + } } public boolean run(DocletEnvironment root) { reporter.print(Kind.NOTE, "just a test: Locale is: " + locale.getDisplayName()); - return locale.getDisplayName(Locale.ENGLISH).contains("Japan"); + return language.equals(locale.getLanguage()) + && country.equals(locale.getCountry()) + && variant.equals(locale.getVariant()); } @Override