JDK-8211194 : issues linking to external documentation (was: missing package-list for JDK10 / JDK11 documentation)
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 10,11
  • Priority: P2
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2018-09-26
  • Updated: 2019-03-05
  • Resolved: 2018-10-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12Resolved
Related Reports
Duplicate :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
affects JDK10 and JDK11.  The package-list is present in JDK9 docs...

A DESCRIPTION OF THE PROBLEM :
According to this https://docs.oracle.com/en/java/javase/11/javadoc/javadoc-command.html, a package-list file should be present at this location https://docs.oracle.com/en/java/javase/11/docs/api/ for javadoc to correctly link to api packages.  Since this file does not currently exist, if javadoc is run with -link  https://docs.oracle.com/en/java/javase/11/docs/api/, a link that is created (e.g. https://docs.oracle.com/en/java/javase/11/docs/api/java/io/InputStream.html?is-external=true) does not include the full package link (java.base) https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/InputStream.html

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run javadoc -d /tmp Foo.java -link 'https://docs.oracle.com/en/java/javase/11/docs/api/'

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
docs link API objects to package documentation
ACTUAL -
docs do not link to package documentation


Comments
fixed as part of JDK-8205593
02-10-2018

[~fmatte] module path isn't the issue here; it's the change from package-list to element-list and related improvements
01-10-2018

Thanks, Priya, Your message sent me back to re-education camp, and I was surprised to learn about "element-list". You may indeed have fixed this in http://hg.openjdk.java.net/jdk/jdk/rev/f7d40158eb2f (it isn't so clear from the bug description) and if so, a workaround ought to be to use the jdk12 javadoc tool to link to the jdk11 javadoc content. There seems to be a lot of follow-up work. Maybe (parts of) this bug needs to be closed as a duplicate. The fix needs to be backported to jdk11 LTS - can it make 11.0.1 ?
01-10-2018

This issue has been fixed as part of fix for https://bugs.openjdk.java.net/browse/JDK-8205593
01-10-2018

This seems like a serious regression, so taking the liberty of increasing the priority. A workaround for keeping links to jdk javadoc working is to link to the jdk10 javadoc instead of the jdk11 javadoc, via javadoc's -link flag (I'm going to keep linking to jdk10 javadoc until this bug is fixed). The javadoc implementation and documentation needs to be more JPMS-aware. The package-list mechanism needs updating. Maybe it needs to contain both module and package location information. There should be a single flag one can pass to -link to get links to jdk javadoc. Best would be if one can simply s/10/11/ in any javadoc option and have it keep working, except for a newer javadoc content. For URLs like https://docs.oracle.com/en/java/javase/11/docs/api/java.base it should also work equally well if you omit /en/java (default to English) and /java.base (unambiguous because no split packages) Having /en/ in the URL only makes sense if multiple languages are available. But I don't see any language other than English - e.g. /ja/ for japanese doesn't work.
01-10-2018

This is an issue, i created simple Foo.java file Foo.java public class Foo {} running javadoc against it creates "public class Foo extends Object" if you click on "Object" it will take you to deadlink https://docs.oracle.com/en/java/javase/11/docs/api/java/lang/Object.html?is-external=true Right link should be https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html Looks like javadoc -link doesn't take module path into consideration
27-09-2018