JDK-8252712 : move doclint to jdk.javadoc module
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-09-02
  • Updated: 2021-02-13
  • Resolved: 2020-09-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b18Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Sub Tasks
JDK-8261679 :  
Description
doclint is currently in jdk.compiler/com.sun.tools.doclint

It was placed there during modularization because of direct references from java.

Arguably, a better arrangement would be to move doclint to the jdk.javadoc module, and make it available to javac via a private JDK service.

---

One minor issue: jshell makes some questionable/inappropriate direct references to doclint internal definitions that will need to be addressed.   These are:
1. simple use of selected HtmlTag enum constants. (Easy enough to fix)
2. use of a mapping from `Entity` to char value. (Bigger deal; may want to expose mapping in `DocTrees`, such as `char getValue(Entity)` etc) JDK-8236142


Comments
Changeset: f765a7f5 Author: Jonathan Gibbons <jjg@openjdk.org> Date: 2020-09-23 19:55:08 +0000 URL: https://git.openjdk.java.net/jdk/commit/f765a7f5
23-09-2020

This can be done with an JDK-internal service interface that is qualified-exported from jdk.compiler to jdk.javadoc, such that `jdk.javadoc` provides the implementation. Service binding will resolve `jdk.javadoc` as the provider if the module is available and not limit-moduled. If the service is not available to javac, javac should gracefully reject use of the `-Xdoclint` option.
02-09-2020