diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java index 9b6b1c831b1..7170c6bcc8a 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, 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 @@ -347,7 +347,7 @@ public class Head extends Content { private void addStylesheet(HtmlTree head, DocPath stylesheet) { head.add(HtmlTree.LINK("stylesheet", "text/css", - pathToRoot.resolve(stylesheet).getPath(), "Style")); + pathToRoot.resolve(stylesheet).getPath())); } private void addScripts(HtmlTree head) { diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java index 4c2477babf5..d6642390335 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/html/HtmlTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2025, 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 @@ -779,15 +779,13 @@ public class HtmlTree extends Content { * @param rel the relevance of the link: the {@code rel} attribute * @param type the type of link: the {@code type} attribute * @param href the path for the link: the {@code href} attribute - * @param title title for the link: the {@code title} attribute * @return the element */ - public static HtmlTree LINK(String rel, String type, String href, String title) { + public static HtmlTree LINK(String rel, String type, String href) { return new HtmlTree(HtmlTag.LINK) .put(HtmlAttr.REL, rel) .put(HtmlAttr.TYPE, type) - .put(HtmlAttr.HREF, href) - .put(HtmlAttr.TITLE, title); + .put(HtmlAttr.HREF, href); } /** diff --git a/test/langtools/jdk/javadoc/doclet/testModuleSpecificStylesheet/TestModuleSpecificStylesheet.java b/test/langtools/jdk/javadoc/doclet/testModuleSpecificStylesheet/TestModuleSpecificStylesheet.java index 48b4750573b..68deacb0e47 100644 --- a/test/langtools/jdk/javadoc/doclet/testModuleSpecificStylesheet/TestModuleSpecificStylesheet.java +++ b/test/langtools/jdk/javadoc/doclet/testModuleSpecificStylesheet/TestModuleSpecificStylesheet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, 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 8219313 + * @bug 8219313 8347058 * @summary Support module specific stylesheets * @library /tools/lib ../../lib * @modules jdk.compiler/com.sun.tools.javac.api @@ -82,22 +82,22 @@ public class TestModuleSpecificStylesheet extends JavadocTester { checkOutput("ma/module-summary.html", true, """ - """); + """); checkOutput("ma/pa/package-summary.html", true, """ - """); + """); checkOutput("ma/pa/A.html", true, """ - """); + """); checkOutput("ma/pa/pb/B.html", true, """ - """); + """); checkOutput("ma/pa/pb/package-summary.html", true, """ - """); + """); } } diff --git a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java index 898a498ddee..e0413538211 100644 --- a/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java +++ b/test/langtools/jdk/javadoc/doclet/testOptions/TestOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2025, 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,7 +24,7 @@ /* * @test * @bug 4749567 8071982 8175200 8186332 8185371 8182765 8217034 8261976 8261976 - * 8275786 + * 8275786 8347058 * @summary Test the output for -header, -footer, -nooverview, -nodeprecatedlist, * -nonavbar, -notree, -stylesheetfile, --main-stylesheet, --add-stylesheet, * --add-script options. @@ -118,7 +118,7 @@ public class TestOptions extends JavadocTester { checkOutput("resource-files/custom-stylesheet.css", true, "Custom javadoc style sheet"); checkOutput("pkg/Foo.html", true, """ - """); + """); } @Test @@ -131,7 +131,7 @@ public class TestOptions extends JavadocTester { checkOutput("resource-files/custom-stylesheet.css", true, "Custom javadoc style sheet"); checkOutput("pkg/Foo.html", true, """ - """); + """); } @Test @@ -149,9 +149,9 @@ public class TestOptions extends JavadocTester { checkOutput("resource-files/additional-stylesheet-3.css", true, "Additional javadoc style sheet 3"); checkOutput("pkg/Foo.html", true, """ - - - """); + + + """); } @Test diff --git a/test/langtools/jdk/javadoc/doclet/testPackageSpecificStylesheet/TestPackageSpecificStylesheet.java b/test/langtools/jdk/javadoc/doclet/testPackageSpecificStylesheet/TestPackageSpecificStylesheet.java index 9c6ddc5616d..284b7957759 100644 --- a/test/langtools/jdk/javadoc/doclet/testPackageSpecificStylesheet/TestPackageSpecificStylesheet.java +++ b/test/langtools/jdk/javadoc/doclet/testPackageSpecificStylesheet/TestPackageSpecificStylesheet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, 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 8213354 + * @bug 8213354 8347058 * @summary Support package-specific stylesheets * @library /tools/lib ../../lib * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -82,15 +82,15 @@ public class TestPackageSpecificStylesheet extends JavadocTester { checkOutput("pkg/A.html", true, """ - """); + """); checkOutput("pkg/package-summary.html", true, """ - """); + """); checkOutput("pkg2/B.html", false, """ - """); + """); } } diff --git a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java index 292d8245982..ba3f64cd8b2 100644 --- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java +++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, 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,7 +26,7 @@ * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881 * 8181622 8182263 8074407 8187521 8198522 8182765 8199278 8196201 8196202 * 8184205 8214468 8222548 8223378 8234746 8241219 8254627 8247994 8263528 - * 8266808 8248863 8305710 8318082 + * 8266808 8248863 8305710 8318082 8347058 * @summary Test the search feature of javadoc. * @library ../../lib * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -418,7 +418,7 @@ public class TestSearch extends JavadocTester { // Test for search related markup checkOutput(fileName, expectedOutput, """ - + """, """ diff --git a/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java b/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java index 06663d2f418..a3dce5448f0 100644 --- a/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java +++ b/test/langtools/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, 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 4494033 7028815 7052425 8007338 8023608 8008164 8016549 8072461 8154261 8162363 8160196 8151743 8177417 * 8175218 8176452 8181215 8182263 8183511 8169819 8183037 8185369 8182765 8196201 8184205 8223378 8241544 - * 8253117 8263528 8289334 8292594 + * 8253117 8263528 8289334 8292594 8347058 * @summary Run tests on doclet stylesheet. * @library /tools/lib ../../lib * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -186,7 +186,7 @@ public class TestStylesheet extends JavadocTester { // Test whether a link to the stylesheet file is inserted properly // in the class documentation. """ - """, + """, """
Test comment for a class which has an anchor_with_name and an anchor_with_id.
"""); @@ -200,7 +200,7 @@ public class TestStylesheet extends JavadocTester { checkOutput("index.html", true, """ - """); + """); checkOutput("resource-files/stylesheet.css", false, """