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
JDK-8252712: move doclint to jdk.javadoc module #133
Conversation
|
@jonathan-gibbons The following labels will be automatically applied to this pull request: When this pull request is ready to be reviewed, an RFR email will be sent to the corresponding mailing lists. If you would like to change these labels, use the |
Webrevs
|
@jonathan-gibbons this pull request can not be integrated into git checkout move-doclint
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
Changes look good apart from minor issues addressed in extra comments.
src/jdk.compiler/share/classes/jdk/internal/shellsupport/doc/JavadocFormatter.java
Show resolved
Hide resolved
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
Outdated
Show resolved
Hide resolved
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/DocLint.java
Outdated
Show resolved
Hide resolved
@jonathan-gibbons This change now passes all automated pre-integration checks. 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 74 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.
|
/integrate |
@jonathan-gibbons Since your change was applied there have been 74 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit f765a7f. |
doclint is a component that can check documentation comments, that can be invoked from either javac or javadoc, via the
-Xdoclint
family of options.When JDK was modularized in JDK9, doclint was left in the
jdk.compiler
module because of direct references to the code from javac, even though functionally the code more naturally belongs in thejdk.javadoc
module.This change moves the code into the
jdk.javadoc
, using a service/provider API to make the functionality available to javac. This should be completely transparent, as long as thejdk.javadoc
module is available when performing service binding. If it is not available, a default no-op implementation is automatically used instead.One minor complication: the old code used static methods on the
DocLint
class to validate options. This is no longer possible when using the service provider mechanism. Instead, the methods are changed to instance methods. The javacOption
enum has no way to cleanly cache an instance of the service provider class, and so a new instance is created for each option. However, this is a relatively lightweight operation, and can reasonably be done for the typically few doclint-related options on the command line.Note: JShell has been making minor use of an internal doclint class enum
HtmlTag
, which is no longer easily available. A minimal local enum is left behind in JShell'sJavadocFomatter
class, sufficient to its requirements. Since the dominant use of the enum is inswitch
statements, an alternative solution, avoiding the local enum, would be to use strings and switch on string instead. However, the use of the local enum is a smaller disturbance to theJavadocFormatter
class.Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/133/head:pull/133
$ git checkout pull/133