-
Bug
-
Resolution: Fixed
-
P3
-
11, 12
-
b26
-
x86_64
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8215998 | 13 | Hannes Wallnoefer | P3 | Resolved | Fixed | b03 |
JDK-8216120 | 12.0.1 | Hannes Wallnoefer | P3 | Resolved | Fixed | master |
JDK-8291047 | 11.0.18-oracle | Hannes Wallnoefer | P3 | Resolved | Fixed | b01 |
JDK-8244171 | 11.0.17 | Vyom Tewari | P3 | Resolved | Fixed | b01 |
ADDITIONAL SYSTEM INFORMATION :
Linux 64-bit (CentOS)
openjdk version "12-ea" 2019-03-19
OpenJDK Runtime Environment (build 12-ea+23)
OpenJDK 64-Bit Server VM (build 12-ea+23, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
When you generate javadoc for a project that does not declare modules (no module-info.java source files), navigating to documentation for a class in any package adds "undefined/" to the URL. This can be solved by adding --no-module-directories to the javadoc command. However, if you also reference external javadoc using -link to documentation that uses modules (e.g. Java 11), links to those classes are broken.
This was reported to have been fixed as part ofJDK-8205593 (see [comment](https://bugs.openjdk.java.net/browse/JDK-8205593?focusedCommentId=14215770&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14215770)), but this variant at least does not appear to be fixed.
REGRESSION : Last worked in version 8u191
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a file named "WithPackage.java" anywhere with the contents from the source code below. Run one of the following commands:
A: javadoc -d ./doc -link 'https://docs.oracle.com/en/java/javase/11/docs/api/' **/*.java
B: javadoc -d ./doc --no-module-directories -link 'https://docs.oracle.com/en/java/javase/11/docs/api/' **/*.java
2. Open ./doc/index.html and search for "WithPackage"
3. Navigate to the result (works with A, but not with B)
4. Navigate to the link for "java.lang.Object"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Navigating at step 3 and 4 result in the expected page and no 404 error
ACTUAL -
Step 3: Works with A, fails with B with an additional "undefined/" in the URL (.../doc/undefined/test/WithPackage.html instead of .../doc/test/WithPackage.html)
Step 4: Fails with A (https://docs.oracle.com/en/java/javase/11/docs/api/java/lang/Object.html?is-external=true), works with B (https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true)
---------- BEGIN SOURCE ----------
package test;
/**
* Searching for this will fail with "undefined/" in the URL unless you build
* with {@code --no-module-directories} specified on the javadoc command line.
* However, when you do add the {@code --no-module-directories}, links to Java
* documentation fail.
*/
public class WithPackage {
}
---------- END SOURCE ----------
FREQUENCY : always
Linux 64-bit (CentOS)
openjdk version "12-ea" 2019-03-19
OpenJDK Runtime Environment (build 12-ea+23)
OpenJDK 64-Bit Server VM (build 12-ea+23, mixed mode, sharing)
A DESCRIPTION OF THE PROBLEM :
When you generate javadoc for a project that does not declare modules (no module-info.java source files), navigating to documentation for a class in any package adds "undefined/" to the URL. This can be solved by adding --no-module-directories to the javadoc command. However, if you also reference external javadoc using -link to documentation that uses modules (e.g. Java 11), links to those classes are broken.
This was reported to have been fixed as part of
REGRESSION : Last worked in version 8u191
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create a file named "WithPackage.java" anywhere with the contents from the source code below. Run one of the following commands:
A: javadoc -d ./doc -link 'https://docs.oracle.com/en/java/javase/11/docs/api/' **/*.java
B: javadoc -d ./doc --no-module-directories -link 'https://docs.oracle.com/en/java/javase/11/docs/api/' **/*.java
2. Open ./doc/index.html and search for "WithPackage"
3. Navigate to the result (works with A, but not with B)
4. Navigate to the link for "java.lang.Object"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Navigating at step 3 and 4 result in the expected page and no 404 error
ACTUAL -
Step 3: Works with A, fails with B with an additional "undefined/" in the URL (.../doc/undefined/test/WithPackage.html instead of .../doc/test/WithPackage.html)
Step 4: Fails with A (https://docs.oracle.com/en/java/javase/11/docs/api/java/lang/Object.html?is-external=true), works with B (https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html?is-external=true)
---------- BEGIN SOURCE ----------
package test;
/**
* Searching for this will fail with "undefined/" in the URL unless you build
* with {@code --no-module-directories} specified on the javadoc command line.
* However, when you do add the {@code --no-module-directories}, links to Java
* documentation fail.
*/
public class WithPackage {
}
---------- END SOURCE ----------
FREQUENCY : always
- backported by
-
JDK-8215998 Broken links when generating from project without modules
- Resolved
-
JDK-8216120 Broken links when generating from project without modules
- Resolved
-
JDK-8244171 Broken links when generating from project without modules
- Resolved
-
JDK-8291047 Broken links when generating from project without modules
- Resolved
(1 links to)