-
Bug
-
Resolution: Fixed
-
P4
-
9, 10, 11
-
b13
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8211916 | 11.0.2 | Priya Lakshmi Muthuswamy | P4 | Resolved | Fixed | b02 |
Found on Java 10.0.1 on linux x86_64. Reproduced on Java 11 build 19.
A DESCRIPTION OF THE PROBLEM :
Where a class references a class in another module, and that module's javadoc is referenced with -link on the javadoc command line, the javadoc link for the other class has an incorrect href attribute, which points to the correct module but does not contain the path elements corresponding to the class's package. This bug only occurs if the target class is in a package which has the same name as the module it is part of.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a module a.b.c with a package a.b.c and a class a.b.c.MyClass. Compile the module to lib/abc.jar and create javadoc for it in /javadocs/abc
Create a second module d.e.f which depends on module a.b.c and uses a.b.c.MyClass. Run javadoc -link /javadocs/a.b.c --module-path lib --source-path src/def src/def/d/e/f/MyClassClient.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The javadoc for MyClassClient will link references to MyClass to its javadoc at /javadoc/abc/a.b.c/a/b/c/MyClass.html
ACTUAL -
The javadoc for MyClassClient links references to MyClass to /javadoc/abc/MyClass.html . The package elements are missing from the URL path.
---------- BEGIN SOURCE ----------
git clone https://github.com/andrewmcguinness/javadoc_issue.git && cd javadoc_issue && ./build.sh
The master branch displays the bug. the "working" branch renames the target module to be different from the package name, and works correctly.
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
If the module name a.b.c is changed to be different from the package name a.b.c, in the module-info.java files, everything works correctly
FREQUENCY : always
- backported by
-
JDK-8211916 Javadoc -link makes broken links if module name matches package name
- Resolved
- duplicates
-
JDK-8211194 issues linking to external documentation (was: missing package-list for JDK10 / JDK11 documentation)
- Closed
-
JDK-8216169 Tool creates broken links to JDK Javadoc
- Closed
- relates to
-
JDK-8222791 Order of evaluation of -link params in Javadoc tool reversed -> regression with split packages
- Resolved
-
JDK-8212233 javadoc fails on jdk12 with "The code being documented uses modules but the packages defined in $URL are in the unnamed module."
- Resolved
-
JDK-8211194 issues linking to external documentation (was: missing package-list for JDK10 / JDK11 documentation)
- Closed