8202626: javadoc generates broken links to <Unnamed>
Reviewed-by: jjg
This commit is contained in:
parent
38cf9d76c8
commit
744d6085b4
@ -183,7 +183,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);
|
||||
for (String pkgname: usingPackageToUsedClasses.keySet()) {
|
||||
PackageElement pkg = utils.elementUtils.getPackageElement(pkgname);
|
||||
Content packageLink = links.createLink(utils.getPackageName(pkg),
|
||||
Content packageLink = links.createLink(getPackageAnchorName(pkg),
|
||||
new StringContent(utils.getPackageName(pkg)));
|
||||
Content summary = new ContentBuilder();
|
||||
if (pkg != null && !pkg.isUnnamed()) {
|
||||
@ -209,9 +209,7 @@ public class PackageUseWriter extends SubWriterHolderWriter {
|
||||
PackageElement usingPackage = utils.elementUtils.getPackageElement(packageName);
|
||||
HtmlTree li = new HtmlTree(HtmlTag.LI);
|
||||
li.setStyle(HtmlStyle.blockList);
|
||||
if (usingPackage != null) {
|
||||
li.addContent(links.createAnchor(utils.getPackageName(usingPackage)));
|
||||
}
|
||||
li.addContent(links.createAnchor(getPackageAnchorName(usingPackage)));
|
||||
String tableSummary = resources.getText("doclet.Use_Table_Summary",
|
||||
resources.getText("doclet.classes"));
|
||||
Content caption = contents.getContent(
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 6492694 8026567 8048351 8162363 8183511 8169819 8074407 8196202
|
||||
* @bug 6492694 8026567 8048351 8162363 8183511 8169819 8074407 8196202 8202626
|
||||
* @summary Test package deprecation.
|
||||
* @author bpatel
|
||||
* @library ../../lib/
|
||||
@ -38,7 +38,6 @@ public class TestPackageDeprecation extends JavadocTester {
|
||||
|
||||
public static void main(String... args) throws Exception {
|
||||
TestPackageDeprecation tester = new TestPackageDeprecation();
|
||||
tester.setAutomaticCheckLinks(false); // @ignore JDK-8202626
|
||||
tester.runTests();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* @test
|
||||
* @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854 8071982 8162363 8175200 8186332
|
||||
* 8182765 8196202
|
||||
* 8182765 8196202 8202626
|
||||
* @summary A simple test to ensure class-use files are correct.
|
||||
* @author jamieh
|
||||
* @library ../../lib
|
||||
@ -39,7 +39,6 @@ public class TestUseOption extends JavadocTester {
|
||||
|
||||
public static void main(String... args) throws Exception {
|
||||
TestUseOption tester = new TestUseOption();
|
||||
tester.setAutomaticCheckLinks(false); // @ignore JDK-8202626
|
||||
tester.runTests();
|
||||
}
|
||||
|
||||
@ -201,7 +200,7 @@ public class TestUseOption extends JavadocTester {
|
||||
checkOutput("package-use.html", true,
|
||||
"<th class=\"colFirst\" scope=\"row\">"
|
||||
+ "<a href=\"class-use/UsedInC.html#unnamed.package\">UsedInC</a></th>",
|
||||
"<th class=\"colFirst\" scope=\"row\"><a href=\"#%3CUnnamed%3E\"><Unnamed></a></th>\n"
|
||||
"<th class=\"colFirst\" scope=\"row\"><a href=\"#unnamed.package\"><Unnamed></a></th>\n"
|
||||
+ "<td class=\"colLast\"> </td>"
|
||||
);
|
||||
}
|
||||
@ -219,7 +218,7 @@ public class TestUseOption extends JavadocTester {
|
||||
"<li class=\"blockList\"><a name=\"unnamed.package\">"
|
||||
);
|
||||
checkOutput("package-use.html", true,
|
||||
"<th class=\"colFirst\" scope=\"row\"><a href=\"#-Unnamed-\"><Unnamed></a></th>\n"
|
||||
"<th class=\"colFirst\" scope=\"row\"><a href=\"#unnamed.package\"><Unnamed></a></th>\n"
|
||||
+ "<td class=\"colLast\"> </td>"
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user