-
Notifications
You must be signed in to change notification settings - Fork 6.2k
JDK-8262886: javadoc generates broken links with {@inheritDoc} #4459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back hannesw! A progress list of the required criteria for merging this PR into |
Webrevs
|
pavelrappo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you haven't already, please run doccheck on the JDK API documentation to make sure the issues mentioned in the JBS issue are gone.
I have checked the mentioned issues. The ones in |
|
This PR is succeeded by openjdk/jdk17#17. |
This change fixes a whole slew of shortcomings in the redirection of relative links in doc comments. The basic idea is that relative links are authored to work in their "native primary" environment (e.g. the package summary page for a package or the class page for a class and its members), and have to be rewritten when used in other contexts such as "use" or index pages.
A list of omissions that are fixed in this change:
While fixing above issues I also made sure link rewriting is kept to a minimum, avoiding it as much as possible for elements that live in the same package.
Furthermore, the test for redirected relative links was a bit out of order. The
javadoccommand issued by the test returnedERRORbecause one of the source files contained non-valid HTML (an anchor with anameattribute to test whether that attribute would be modified). Because of this, thecheckLinks()method was never invoked, which is a problem for a test that is supposed to make sure generated links are valid. I changed the test to use the valididattribute instead ofnameand made surecheckLinks()is executed again.I also added checks for the newly supported cases. I added a whole new test for modules since retrofitting the existing test to cover modules would not have been practical.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4459/head:pull/4459$ git checkout pull/4459Update a local copy of the PR:
$ git checkout pull/4459$ git pull https://git.openjdk.java.net/jdk pull/4459/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4459View PR using the GUI difftool:
$ git pr show -t 4459Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4459.diff