-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8345770: javadoc: API documentation builds are not always reproducible #22732
Conversation
👋 Welcome back hannesw! A progress list of the required criteria for merging this PR into |
@hns This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 23 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
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.
Great change!
I compared the generated docs before/after the change and the changes are all in theclass-use
pages, where the qualified name is now used instead.
List of changed files
java.base/java/nio/file/attribute/class-use/AclEntryPermission.html
java.base/java/math/class-use/BigDecimal.html
java.base/java/lang/class-use/Boolean.html
java.base/java/lang/class-use/Character.UnicodeBlock.html
java.desktop/java/awt/class-use/ComponentOrientation.html
java.base/java/util/concurrent/class-use/CountedCompleter.html
java.desktop/java/awt/class-use/Cursor.html
java.datatransfer/java/awt/datatransfer/class-use/DataFlavor.html
java.base/java/net/class-use/DatagramSocket.html
java.base/java/util/concurrent/class-use/ForkJoinTask.html
java.desktop/javax/swing/class-use/JLayer.html
java.base/java/lang/classfile/instruction/LabelTarget.html
jdk.dynalink/jdk/dynalink/linker/class-use/LinkerServices.html
java.base/java/util/concurrent/locks/class-use/Lock.html
java.base/java/lang/invoke/class-use/MethodHandle.html
java.base/java/lang/invoke/class-use/MethodHandles.Lookup.html
java.base/java/lang/class-use/Object.html
java.base/java/util/class-use/Optional.html
java.prefs/java/util/prefs/class-use/Preferences.html
java.base/java/util/concurrent/locks/class-use/ReadWriteLock.html
java.base/java/net/class-use/ServerSocket.html
java.base/java/net/class-use/Socket.html
java.base/java/lang/class-use/String.html
java.base/java/net/class-use/URL.html
java.base/java/util/class-use/UUID.html
java.xml/javax/xml/stream/class-use/XMLEventFactory.html
java.xml/javax/xml/stream/class-use/XMLInputFactory.html
java.xml/javax/xml/stream/class-use/XMLOutputFactory.html
java.xml/javax/xml/xpath/class-use/XPathFactory.html
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.
Code change makes sense.
/integrate |
Going to push as commit 4fc43b0.
Your commit was automatically rebased without conflicts. |
Please review a fix for a bug that could cause non-reproducible documentation builds and the wrong link label being used in summary pages.
We used to rely on field
HtmlConfiguration.currentTypeElement
to decide whether to include the type name in member links generated from{@link}
or@see
tags. However, that field was only set by theClassWriter
andClassUseWriter
classes, but never unset by any other writer class, so effectively it contained the last instead of the current type element. This resulted in summary pages using non-qualified member links, depending on the last previously executing class writer.The fix is to use
HtmlDocletWriter.getCurrentTypeElement()
(previously calledgetCurrentPageElement()
) instead. Note that this method returnsnull
forClassUseWriter
, so it changes the generated documentation for class-use pages. The new behavior is preferable, because class-use pages are primarily about other classes using the class, so links to members of the used class should be qualified by the class name. A good example for this are the links to theFALSE
andTRUE
fields in the class use page for java.lang.Boolean which should include the class name.As mentioned above I also renamed
getCurrentPageElement()
method togetCurrentTypeElement()
and made the doc comments a bit more precise.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22732/head:pull/22732
$ git checkout pull/22732
Update a local copy of the PR:
$ git checkout pull/22732
$ git pull https://git.openjdk.org/jdk.git pull/22732/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22732
View PR using the GUI difftool:
$ git pr show -t 22732
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22732.diff
Using Webrev
Link to Webrev Comment