This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
@@ -43,7 +44,7 @@ import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
*
* @author Atul M Dambalkar
*/
-public class PackageListWriter {
+public class ElementListWriter {
private final BaseConfiguration configuration;
private final Utils utils;
@@ -54,31 +55,44 @@ public class PackageListWriter {
*
* @param configuration the current configuration of the doclet.
*/
- public PackageListWriter(BaseConfiguration configuration) {
- file = DocFile.createFileForOutput(configuration, DocPaths.PACKAGE_LIST);
+ public ElementListWriter(BaseConfiguration configuration) {
+ file = DocFile.createFileForOutput(configuration, DocPaths.ELEMENT_LIST);
this.configuration = configuration;
this.utils = configuration.utils;
}
/**
- * Generate the package index.
+ * Generate the element index.
*
* @param configuration the current configuration of the doclet.
* @throws DocFileIOException if there is a problem writing the output
*/
public static void generate(BaseConfiguration configuration) throws DocFileIOException {
- PackageListWriter packgen = new PackageListWriter(configuration);
- packgen.generatePackageListFile(configuration.docEnv);
+ ElementListWriter elemgen = new ElementListWriter(configuration);
+ elemgen.generateElementListFile(configuration.docEnv);
}
- protected void generatePackageListFile(DocletEnvironment docEnv) throws DocFileIOException {
+ protected void generateElementListFile(DocletEnvironment docEnv) throws DocFileIOException {
try (BufferedWriter out = new BufferedWriter(file.openWriter())) {
- for (PackageElement pkg : configuration.packages) {
- // if the -nodeprecated option is set and the package is marked as
- // deprecated, do not include it in the packages list.
- if (!(configuration.nodeprecated && utils.isDeprecated(pkg))) {
- out.write(pkg.toString());
- out.newLine();
+ if (configuration.showModules) {
+ for (ModuleElement mdle : configuration.modulePackages.keySet()) {
+ if (!(configuration.nodeprecated && utils.isDeprecated(mdle))) {
+ out.write(DocletConstants.MODULE_PREFIX + mdle.toString());
+ out.newLine();
+ for (PackageElement pkg : configuration.modulePackages.get(mdle)) {
+ out.write(pkg.toString());
+ out.newLine();
+ }
+ }
+ }
+ } else {
+ for (PackageElement pkg : configuration.packages) {
+ // if the -nodeprecated option is set and the package is marked as
+ // deprecated, do not include it in the packages list.
+ if (!(configuration.nodeprecated && utils.isDeprecated(pkg))) {
+ out.write(pkg.toString());
+ out.newLine();
+ }
}
}
} catch (IOException e) {
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java
index 84ce1940b5f..4a3b3b0f03b 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java
@@ -56,10 +56,10 @@ import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
public class Extern {
/**
- * Map package names onto Extern Item objects.
+ * Map element names onto Extern Item objects.
* Lazily initialized.
*/
- private MapDocErrorReporter
used to report errors.
* @return true if successful, false otherwise
- * @throws DocFileIOException if there is a problem reading a package list file
+ * @throws DocFileIOException if there is a problem reading a element list file
*/
public boolean link(String url, Reporter reporter) throws DocFileIOException {
return link(url, url, reporter, false);
}
/**
- * Build the extern package list from given URL or the directory path,
+ * Build the extern element list from given URL or the directory path,
* as specified with the "-linkoffline" flag.
* Flag error if the "-link" or "-linkoffline" option is already used.
*
* @param url URL or Directory path.
- * @param pkglisturl This can be another URL for "package-list" or ordinary
+ * @param elemlisturl This can be another URL for "element-list" or ordinary
* file.
* @param reporter The DocErrorReporter
used to report errors.
* @return true if successful, false otherwise
- * @throws DocFileIOException if there is a problem reading a package list file
+ * @throws DocFileIOException if there is a problem reading the element list file
*/
- public boolean link(String url, String pkglisturl, Reporter reporter) throws DocFileIOException {
- return link(url, pkglisturl, reporter, true);
+ public boolean link(String url, String elemlisturl, Reporter reporter) throws DocFileIOException {
+ return link(url, elemlisturl, reporter, true);
}
/*
- * Build the extern package list from given URL or the directory path.
+ * Build the extern element list from given URL or the directory path.
* Flag error if the "-link" or "-linkoffline" option is already used.
*
* @param url URL or Directory path.
- * @param pkglisturl This can be another URL for "package-list" or ordinary
+ * @param elemlisturl This can be another URL for "element-list" or ordinary
* file.
* @param reporter The DocErrorReporter
used to report errors.
* @param linkoffline True if -linkoffline is used and false if -link is used.
* @return true if successful, false otherwise
- * @throws DocFileIOException if there is a problem reading a package list file
+ * @throws DocFileIOException if there is a problem reading the element list file
*/
- private boolean link(String url, String pkglisturl, Reporter reporter, boolean linkoffline)
+ private boolean link(String url, String elemlisturl, Reporter reporter, boolean linkoffline)
throws DocFileIOException {
this.linkoffline = linkoffline;
try {
url = adjustEndFileSeparator(url);
- if (isUrl(pkglisturl)) {
- readPackageListFromURL(url, toURL(adjustEndFileSeparator(pkglisturl)));
+ if (isUrl(elemlisturl)) {
+ readElementListFromURL(url, toURL(adjustEndFileSeparator(elemlisturl)));
} else {
- readPackageListFromFile(url, DocFile.createFileForInput(configuration, pkglisturl));
+ readElementListFromFile(url, DocFile.createFileForInput(configuration, elemlisturl));
}
return true;
} catch (Fault f) {
@@ -245,15 +263,15 @@ public class Extern {
}
/**
- * Get the Extern Item object associated with this package name.
+ * Get the Extern Item object associated with this element name.
*
- * @param pkgName Package name.
+ * @param elemName Element name.
*/
- private Item findPackageItem(String pkgName) {
- if (packageToItemMap == null) {
+ private Item findElementItem(String elemName) {
+ if (elementToItemMap == null) {
return null;
}
- return packageToItemMap.get(pkgName);
+ return elementToItemMap.get(elemName);
}
/**
@@ -264,42 +282,75 @@ public class Extern {
}
/**
- * Fetch the URL and read the "package-list" file.
+ * Fetch the URL and read the "element-list" file.
*
- * @param urlpath Path to the packages.
- * @param pkglisturlpath URL or the path to the "package-list" file.
+ * @param urlpath Path to the elements.
+ * @param elemlisturlpath URL or the path to the "element-list" file.
*/
- private void readPackageListFromURL(String urlpath, URL pkglisturlpath) throws Fault {
+ private void readElementListFromURL(String urlpath, URL elemlisturlpath) throws Fault {
try {
- URL link = pkglisturlpath.toURI().resolve(DocPaths.PACKAGE_LIST.getPath()).toURL();
- readPackageList(link.openStream(), urlpath, false);
+ URL link = elemlisturlpath.toURI().resolve(DocPaths.ELEMENT_LIST.getPath()).toURL();
+ readElementList(link.openStream(), urlpath, false);
} catch (URISyntaxException | MalformedURLException exc) {
- throw new Fault(configuration.getText("doclet.MalformedURL", pkglisturlpath.toString()), exc);
+ throw new Fault(configuration.getText("doclet.MalformedURL", elemlisturlpath.toString()), exc);
} catch (IOException exc) {
- throw new Fault(configuration.getText("doclet.URL_error", pkglisturlpath.toString()), exc);
+ readAlternateURL(urlpath, elemlisturlpath);
}
}
/**
- * Read the "package-list" file which is available locally.
+ * Fetch the URL and read the "package-list" file.
*
- * @param path URL or directory path to the packages.
- * @param pkgListPath Path to the local "package-list" file.
- * @throws Fault if an error occurs that can be treated as a warning
- * @throws DocFileIOException if there is a problem opening the package list file
+ * @param urlpath Path to the packages.
+ * @param elemlisturlpath URL or the path to the "package-list" file.
*/
- private void readPackageListFromFile(String path, DocFile pkgListPath)
+ private void readAlternateURL(String urlpath, URL elemlisturlpath) throws Fault {
+ try {
+ URL link = elemlisturlpath.toURI().resolve(DocPaths.PACKAGE_LIST.getPath()).toURL();
+ readElementList(link.openStream(), urlpath, false);
+ } catch (URISyntaxException | MalformedURLException exc) {
+ throw new Fault(configuration.getText("doclet.MalformedURL", elemlisturlpath.toString()), exc);
+ } catch (IOException exc) {
+ throw new Fault(configuration.getText("doclet.URL_error", elemlisturlpath.toString()), exc);
+ }
+ }
+
+ /**
+ * Read the "element-list" file which is available locally.
+ *
+ * @param path URL or directory path to the elements.
+ * @param elemListPath Path to the local "element-list" file.
+ * @throws Fault if an error occurs that can be treated as a warning
+ * @throws DocFileIOException if there is a problem opening the element list file
+ */
+ private void readElementListFromFile(String path, DocFile elemListPath)
throws Fault, DocFileIOException {
- DocFile file = pkgListPath.resolve(DocPaths.PACKAGE_LIST);
+ DocFile file = elemListPath.resolve(DocPaths.ELEMENT_LIST);
if (! (file.isAbsolute() || linkoffline)){
file = file.resolveAgainst(DocumentationTool.Location.DOCUMENTATION_OUTPUT);
}
+ if (file.exists()) {
+ readElementList(file, path);
+ } else {
+ DocFile file1 = elemListPath.resolve(DocPaths.PACKAGE_LIST);
+ if (!(file1.isAbsolute() || linkoffline)) {
+ file1 = file1.resolveAgainst(DocumentationTool.Location.DOCUMENTATION_OUTPUT);
+ }
+ if (file1.exists()) {
+ readElementList(file1, path);
+ } else {
+ throw new Fault(configuration.getText("doclet.File_error", file.getPath()), null);
+ }
+ }
+ }
+
+ private void readElementList(DocFile file, String path) throws Fault, DocFileIOException {
try {
- if (file.exists() && file.canRead()) {
- boolean pathIsRelative =
- !isUrl(path)
+ if (file.canRead()) {
+ boolean pathIsRelative
+ = !isUrl(path)
&& !DocFile.createFileForInput(configuration, path).isAbsolute();
- readPackageList(file.openInputStream(), path, pathIsRelative);
+ readElementList(file.openInputStream(), path, pathIsRelative);
} else {
throw new Fault(configuration.getText("doclet.File_error", file.getPath()), null);
}
@@ -309,33 +360,32 @@ public class Extern {
}
/**
- * Read the file "package-list" and for each package name found, create
- * Extern object and associate it with the package name in the map.
+ * Read the file "element-list" and for each element name found, create
+ * Extern object and associate it with the element name in the map.
*
- * @param input InputStream from the "package-list" file.
- * @param path URL or the directory path to the packages.
+ * @param input InputStream from the "element-list" file.
+ * @param path URL or the directory path to the elements.
* @param relative Is path relative?
* @throws IOException if there is a problem reading or closing the stream
*/
- private void readPackageList(InputStream input, String path, boolean relative)
+ private void readElementList(InputStream input, String path, boolean relative)
throws IOException {
try (BufferedReader in = new BufferedReader(new InputStreamReader(input))) {
- StringBuilder strbuf = new StringBuilder();
- int c;
- while ((c = in.read()) >= 0) {
- char ch = (char) c;
- if (ch == '\n' || ch == '\r') {
- if (strbuf.length() > 0) {
- String packname = strbuf.toString();
- String packpath = path
- + packname.replace('.', '/') + '/';
- Item ignore = new Item(packname, packpath, relative);
- strbuf.setLength(0);
+ in.lines().forEach((elemname) -> {
+ if (elemname.length() > 0) {
+ boolean module;
+ String elempath;
+ if (elemname.startsWith(DocletConstants.MODULE_PREFIX)) {
+ elemname = elemname.replace(DocletConstants.MODULE_PREFIX, "");
+ elempath = path;
+ module = true;
+ } else {
+ elempath = path + elemname.replace('.', '/') + '/';
+ module = false;
}
- } else {
- strbuf.append(ch);
+ Item ignore = new Item(elemname, elempath, relative, module);
}
- }
+ });
}
}
diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
index 8b3d4593259..c4e71b166c6 100644
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
@@ -2673,7 +2673,8 @@ public class Utils {
}
/**
- * package name, an unnamed package is returned as <Unnamed>
+ * Get the package name for a given package element. An unnamed package is returned as <Unnamed>
+ *
* @param pkg
* @return
*/
@@ -2684,6 +2685,19 @@ public class Utils {
return pkg.getQualifiedName().toString();
}
+ /**
+ * Get the module name for a given module element. An unnamed module is returned as <Unnamed>
+ *
+ * @param mdle a ModuleElement
+ * @return
+ */
+ public String getModuleName(ModuleElement mdle) {
+ if (mdle == null || mdle.isUnnamed()) {
+ return DocletConstants.DEFAULT_ELEMENT_NAME;
+ }
+ return mdle.getQualifiedName().toString();
+ }
+
public boolean isAttribute(DocTree doctree) {
return isKind(doctree, ATTRIBUTE);
}
diff --git a/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java b/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java
index 4abe9f1e104..6e8e3431a93 100644
--- a/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java
+++ b/test/langtools/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4652655 4857717 8025633 8026567 8071982
+ * @bug 4652655 4857717 8025633 8026567 8071982 8164407
* @summary This test verifies that class cross references work properly.
* @author jamieh
* @library ../lib
@@ -52,16 +52,16 @@ public class TestClassCrossReferences extends JavadocTester {
checkExit(Exit.OK);
checkOutput("C.html", true,
- ""
+ ""
+ "Link to math package
",
"Link to AttributeContext innerclass
",
+ + "title=\"class or interface in javax.swing.text\" class=\"externalLink\">Link to AttributeContext innerclass
",
"Link to external class BigDecimal
",
+ + "title=\"class or interface in java.math\" class=\"externalLink\">Link to external class BigDecimal
",
"Link to external member gcd
",
+ + "title=\"class or interface in java.math\" class=\"externalLink\">Link to external member gcd
",
"Link to external member URI
",
+ + "title=\"class or interface in javax.tools\" class=\"externalLink\">Link to external member URI
",
"\n"
+ "
");
}
+
+ void checkLinkOffline() {
+ checkOutput("testpkg3mdlB/package-summary.html", true,
+ "toString
in class java.lang.Object
File
",
+ + "title=\"class or interface in java.io\" class=\"externalLink\">File
",
"glossary",
"Second File Link
",
+ + "title=\"class or interface in java.io\" class=\"externalLink\">Second File Link
",
"The value of @docRoot is \"./\"");
checkOutput("index-all.html", true,
diff --git a/test/langtools/jdk/javadoc/doclet/testExternalOverridenMethod/TestExternalOverridenMethod.java b/test/langtools/jdk/javadoc/doclet/testExternalOverridenMethod/TestExternalOverridenMethod.java
index 761e893720c..23a3d6d0454 100644
--- a/test/langtools/jdk/javadoc/doclet/testExternalOverridenMethod/TestExternalOverridenMethod.java
+++ b/test/langtools/jdk/javadoc/doclet/testExternalOverridenMethod/TestExternalOverridenMethod.java
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4857717 8025633 8026567
+ * @bug 4857717 8025633 8026567 8164407
* @summary Test to make sure that externally overriden and implemented methods
* are documented properly. The method should still include "implements" or
* "overrides" documentation even though the method is external.
@@ -53,14 +53,14 @@ public class TestExternalOverridenMethod extends JavadocTester {
checkOutput("pkg/XReader.html", true,
"read
in class "
+ + "title=\"class or interface in java.io\" class=\"externalLink\">read
in class "
+ "FilterReader
readInt
in interface "
+ + "title=\"class or interface in java.io\" class=\"externalLink\">readInt
in interface "
+ "DataInput
Link to String Class
",
+ + "title=\"class or interface in java.lang\" class=\"externalLink\">Link to String Class
",
//Make sure the parameters are indented properly when the -link option is used.
"(int p1,\n"
+ " int p2,\n"
+ " int p3)",
"(int p1,\n"
+ " int p2,\n"
- + " "
+ + " "
+ "Object p3)");
checkOutput("pkg/B.html", true,
"getSystemClassLoader()"
+ + " title=\"class or interface in java.lang\" class=\"externalLink\">
as the parent class loader.getSystemClassLoader()"
+ "
"
+ ""
+ "
.createTempFile(prefix, suffix, null)
getSystemClassLoader()
",
"createTempFile(prefix, suffix, null)
",
"public abstract class StringBuilderChild\n"
+ "extends Object
"
+ + "title=\"class or interface in java.lang\" class=\"externalLink\">Object"
);
// Generate the documentation using -linkoffline and a relative path as the first parameter.
@@ -120,7 +120,7 @@ public class TestLinkOption extends JavadocTester {
checkExit(Exit.OK);
checkOutput("pkg2/C2.html", true,
"This is a link to Class C
."
+ "title=\"class or interface in pkg\" class=\"externalLink\">Class C
."
);
String out3 = "out3";
@@ -149,10 +149,10 @@ public class TestLinkOption extends JavadocTester {
+ "
\n"
+ " link to pkg2.C2
\n"
+ + "title=\"class or interface in pkg2\" class=\"externalLink\">link to pkg2.C2
\n"
+ "
\n"
+ " "
+ + "title=\"class or interface in mylib.lang\" class=\"externalLink\">"
+ "link to mylib.lang.StringBuilderChild
.
\n"
+ " link to pkg2.C2
\n"
+ + "title=\"class or interface in pkg2\" class=\"externalLink\">link to pkg2.C2
\n"
+ "
\n"
+ " "
+ + "title=\"class or interface in mylib.lang\" class=\"externalLink\">"
+ "link to mylib.lang.StringBuilderChild
.Link to String Class
");
+ checkOutput("testpkg3mdlB/package-summary.html", true,
+ "Link to java.lang package
");
+ checkOutput("testpkg3mdlB/package-summary.html", true,
+ "Link to java.base module
");
+}
}
diff --git a/test/langtools/jdk/javadoc/doclet/testModules/jdk/element-list b/test/langtools/jdk/javadoc/doclet/testModules/jdk/element-list
new file mode 100644
index 00000000000..257ae9f908f
--- /dev/null
+++ b/test/langtools/jdk/javadoc/doclet/testModules/jdk/element-list
@@ -0,0 +1,343 @@
+module:java.activation
+javax.activation
+module:java.base
+java.io
+java.lang
+java.lang.annotation
+java.lang.invoke
+java.lang.module
+java.lang.ref
+java.lang.reflect
+java.math
+java.net
+java.net.spi
+java.nio
+java.nio.channels
+java.nio.channels.spi
+java.nio.charset
+java.nio.charset.spi
+java.nio.file
+java.nio.file.attribute
+java.nio.file.spi
+java.security
+java.security.acl
+java.security.cert
+java.security.interfaces
+java.security.spec
+java.text
+java.text.spi
+java.time
+java.time.chrono
+java.time.format
+java.time.temporal
+java.time.zone
+java.util
+java.util.concurrent
+java.util.concurrent.atomic
+java.util.concurrent.locks
+java.util.function
+java.util.jar
+java.util.regex
+java.util.spi
+java.util.stream
+java.util.zip
+javax.crypto
+javax.crypto.interfaces
+javax.crypto.spec
+javax.net
+javax.net.ssl
+javax.security.auth
+javax.security.auth.callback
+javax.security.auth.login
+javax.security.auth.spi
+javax.security.auth.x500
+javax.security.cert
+module:java.compiler
+javax.annotation.processing
+javax.lang.model
+javax.lang.model.element
+javax.lang.model.type
+javax.lang.model.util
+javax.tools
+module:java.corba
+javax.activity
+javax.rmi
+javax.rmi.CORBA
+org.omg.CORBA
+org.omg.CORBA_2_3
+org.omg.CORBA_2_3.portable
+org.omg.CORBA.DynAnyPackage
+org.omg.CORBA.ORBPackage
+org.omg.CORBA.portable
+org.omg.CORBA.TypeCodePackage
+org.omg.CosNaming
+org.omg.CosNaming.NamingContextExtPackage
+org.omg.CosNaming.NamingContextPackage
+org.omg.Dynamic
+org.omg.DynamicAny
+org.omg.DynamicAny.DynAnyFactoryPackage
+org.omg.DynamicAny.DynAnyPackage
+org.omg.IOP
+org.omg.IOP.CodecFactoryPackage
+org.omg.IOP.CodecPackage
+org.omg.Messaging
+org.omg.PortableInterceptor
+org.omg.PortableInterceptor.ORBInitInfoPackage
+org.omg.PortableServer
+org.omg.PortableServer.CurrentPackage
+org.omg.PortableServer.POAManagerPackage
+org.omg.PortableServer.POAPackage
+org.omg.PortableServer.portable
+org.omg.PortableServer.ServantLocatorPackage
+org.omg.SendingContext
+org.omg.stub.java.rmi
+module:java.datatransfer
+java.awt.datatransfer
+module:java.desktop
+java.applet
+java.awt
+java.awt.color
+java.awt.desktop
+java.awt.dnd
+java.awt.event
+java.awt.font
+java.awt.geom
+java.awt.im
+java.awt.im.spi
+java.awt.image
+java.awt.image.renderable
+java.awt.print
+java.beans
+java.beans.beancontext
+javax.accessibility
+javax.imageio
+javax.imageio.event
+javax.imageio.metadata
+javax.imageio.plugins.bmp
+javax.imageio.plugins.jpeg
+javax.imageio.plugins.tiff
+javax.imageio.spi
+javax.imageio.stream
+javax.print
+javax.print.attribute
+javax.print.attribute.standard
+javax.print.event
+javax.sound.midi
+javax.sound.midi.spi
+javax.sound.sampled
+javax.sound.sampled.spi
+javax.swing
+javax.swing.border
+javax.swing.colorchooser
+javax.swing.event
+javax.swing.filechooser
+javax.swing.plaf
+javax.swing.plaf.basic
+javax.swing.plaf.metal
+javax.swing.plaf.multi
+javax.swing.plaf.nimbus
+javax.swing.plaf.synth
+javax.swing.table
+javax.swing.text
+javax.swing.text.html
+javax.swing.text.html.parser
+javax.swing.text.rtf
+javax.swing.tree
+javax.swing.undo
+module:java.instrument
+java.lang.instrument
+module:java.logging
+java.util.logging
+module:java.management
+java.lang.management
+javax.management
+javax.management.loading
+javax.management.modelmbean
+javax.management.monitor
+javax.management.openmbean
+javax.management.relation
+javax.management.remote
+javax.management.timer
+module:java.management.rmi
+javax.management.remote.rmi
+module:java.naming
+javax.naming
+javax.naming.directory
+javax.naming.event
+javax.naming.ldap
+javax.naming.spi
+module:java.prefs
+java.util.prefs
+module:java.rmi
+java.rmi
+java.rmi.activation
+java.rmi.dgc
+java.rmi.registry
+java.rmi.server
+javax.rmi.ssl
+module:java.scripting
+javax.script
+module:java.se
+module:java.se.ee
+module:java.security.jgss
+javax.security.auth.kerberos
+org.ietf.jgss
+module:java.security.sasl
+javax.security.sasl
+module:java.smartcardio
+javax.smartcardio
+module:java.sql
+java.sql
+javax.sql
+javax.transaction.xa
+module:java.sql.rowset
+javax.sql.rowset
+javax.sql.rowset.serial
+javax.sql.rowset.spi
+module:java.transaction
+javax.transaction
+module:java.xml
+javax.xml
+javax.xml.catalog
+javax.xml.datatype
+javax.xml.namespace
+javax.xml.parsers
+javax.xml.stream
+javax.xml.stream.events
+javax.xml.stream.util
+javax.xml.transform
+javax.xml.transform.dom
+javax.xml.transform.sax
+javax.xml.transform.stax
+javax.xml.transform.stream
+javax.xml.validation
+javax.xml.xpath
+org.w3c.dom
+org.w3c.dom.bootstrap
+org.w3c.dom.events
+org.w3c.dom.ls
+org.w3c.dom.ranges
+org.w3c.dom.traversal
+org.w3c.dom.views
+org.xml.sax
+org.xml.sax.ext
+org.xml.sax.helpers
+module:java.xml.bind
+javax.xml.bind
+javax.xml.bind.annotation
+javax.xml.bind.annotation.adapters
+javax.xml.bind.attachment
+javax.xml.bind.helpers
+javax.xml.bind.util
+module:java.xml.crypto
+javax.xml.crypto
+javax.xml.crypto.dom
+javax.xml.crypto.dsig
+javax.xml.crypto.dsig.dom
+javax.xml.crypto.dsig.keyinfo
+javax.xml.crypto.dsig.spec
+module:java.xml.ws
+javax.jws
+javax.jws.soap
+javax.xml.soap
+javax.xml.ws
+javax.xml.ws.handler
+javax.xml.ws.handler.soap
+javax.xml.ws.http
+javax.xml.ws.soap
+javax.xml.ws.spi
+javax.xml.ws.spi.http
+javax.xml.ws.wsaddressing
+module:java.xml.ws.annotation
+javax.annotation
+module:jdk.accessibility
+com.sun.java.accessibility.util
+module:jdk.attach
+com.sun.tools.attach
+com.sun.tools.attach.spi
+module:jdk.charsets
+module:jdk.compiler
+com.sun.source.doctree
+com.sun.source.tree
+com.sun.source.util
+com.sun.tools.javac
+module:jdk.crypto.cryptoki
+module:jdk.crypto.ec
+module:jdk.dynalink
+jdk.dynalink
+jdk.dynalink.beans
+jdk.dynalink.linker
+jdk.dynalink.linker.support
+jdk.dynalink.support
+module:jdk.editpad
+module:jdk.hotspot.agent
+module:jdk.httpserver
+com.sun.net.httpserver
+com.sun.net.httpserver.spi
+module:jdk.incubator.httpclient
+jdk.incubator.http
+module:jdk.jartool
+com.sun.jarsigner
+jdk.security.jarsigner
+module:jdk.javadoc
+com.sun.javadoc
+com.sun.tools.javadoc
+jdk.javadoc.doclet
+module:jdk.jcmd
+module:jdk.jconsole
+com.sun.tools.jconsole
+module:jdk.jdeps
+module:jdk.jdi
+com.sun.jdi
+com.sun.jdi.connect
+com.sun.jdi.connect.spi
+com.sun.jdi.event
+com.sun.jdi.request
+module:jdk.jdwp.agent
+module:jdk.jfr
+jdk.jfr
+jdk.jfr.consumer
+module:jdk.jlink
+module:jdk.jshell
+jdk.jshell
+jdk.jshell.execution
+jdk.jshell.spi
+jdk.jshell.tool
+module:jdk.jsobject
+netscape.javascript
+module:jdk.jstatd
+module:jdk.localedata
+module:jdk.management
+com.sun.management
+module:jdk.management.agent
+module:jdk.management.cmm
+jdk.management.cmm
+module:jdk.management.jfr
+jdk.management.jfr
+module:jdk.management.resource
+jdk.management.resource
+module:jdk.naming.dns
+module:jdk.naming.rmi
+module:jdk.net
+jdk.net
+module:jdk.pack
+module:jdk.rmic
+module:jdk.scripting.nashorn
+jdk.nashorn.api.scripting
+jdk.nashorn.api.tree
+module:jdk.sctp
+com.sun.nio.sctp
+module:jdk.security.auth
+com.sun.security.auth
+com.sun.security.auth.callback
+com.sun.security.auth.login
+com.sun.security.auth.module
+module:jdk.security.jgss
+com.sun.security.jgss
+module:jdk.snmp
+module:jdk.xml.dom
+org.w3c.dom.css
+org.w3c.dom.html
+org.w3c.dom.stylesheets
+org.w3c.dom.xpath
+module:jdk.zipfs
diff --git a/test/langtools/jdk/javadoc/doclet/testModules/moduleB/module-info.java b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/module-info.java
index 41d934720e6..68c42f70a16 100644
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleB/module-info.java
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/module-info.java
@@ -36,6 +36,7 @@ module moduleB {
opens testpkgmdlB;
exports testpkg2mdlB to moduleA;
+ exports testpkg3mdlB to moduleA;
uses testpkgmdlB.TestClassInModuleB;
uses testpkgmdlB.TestClass2InModuleB;
diff --git a/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkg3mdlB/TestClassLinkOption.java b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkg3mdlB/TestClassLinkOption.java
new file mode 100644
index 00000000000..425b9173922
--- /dev/null
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkg3mdlB/TestClassLinkOption.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, 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. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 testpkg3mdlB;
+
+/**
+ * {@link java.lang.String Link to String Class}.
+ * {@link java.lang Link to java.lang package}.
+ * {@link java.base Link to java.base module}.
+ *
+ * @author bhavespa
+ */
+public class TestClassLinkOption {
+ public String testMethod() {
+ return "foo";
+ }
+}
diff --git a/test/langtools/jdk/javadoc/doclet/testTitleInHref/TestTitleInHref.java b/test/langtools/jdk/javadoc/doclet/testTitleInHref/TestTitleInHref.java
index 6a2fd8e99d9..acc4b6636c1 100644
--- a/test/langtools/jdk/javadoc/doclet/testTitleInHref/TestTitleInHref.java
+++ b/test/langtools/jdk/javadoc/doclet/testTitleInHref/TestTitleInHref.java
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4714257
+ * @bug 4714257 8164407
* @summary Test to make sure that the title attribute shows up in links.
* @author jamieh
* @library ../lib
@@ -55,7 +55,7 @@ public class TestTitleInHref extends JavadocTester {
"",
//Test to make sure that the title shows up in cross link shows up
""
+ + "title=\"class or interface in java.io\" class=\"externalLink\">"
+ "This is a cross link to class File
");
}
}
diff --git a/test/langtools/jdk/javadoc/tool/api/basic/APITest.java b/test/langtools/jdk/javadoc/tool/api/basic/APITest.java
index 34d7915ec97..f224bb29ddc 100644
--- a/test/langtools/jdk/javadoc/tool/api/basic/APITest.java
+++ b/test/langtools/jdk/javadoc/tool/api/basic/APITest.java
@@ -227,7 +227,7 @@ class APITest {
"member-search-index.js",
"member-search-index.zip",
"overview-tree.html",
- "package-list",
+ "element-list",
"package-search-index.js",
"package-search-index.zip",
"pkg/C.html",
diff --git a/test/langtools/tools/javadoc/api/basic/APITest.java b/test/langtools/tools/javadoc/api/basic/APITest.java
index 34d7915ec97..f224bb29ddc 100644
--- a/test/langtools/tools/javadoc/api/basic/APITest.java
+++ b/test/langtools/tools/javadoc/api/basic/APITest.java
@@ -227,7 +227,7 @@ class APITest {
"member-search-index.js",
"member-search-index.zip",
"overview-tree.html",
- "package-list",
+ "element-list",
"package-search-index.js",
"package-search-index.zip",
"pkg/C.html",