RFR: 8335122: Reorganize internal low-level support for HTML in jdk.javadoc [v8]

Jonathan Gibbons jjg at openjdk.org
Thu Aug 1 20:41:48 UTC 2024


> Please review a change to reorganize the internal low-level support for HTML in the jdk.javadoc module.
> 
> Hitherto, there are two separate sets of classes for low-level support for HTML in the `jdk.javadoc` module: one, in doclint, focused on reading and checking classes, the other, in the standard doclet, focused on generating HTML. This PR merges those two sets, into a new package `jdk.javadoc.internal.html` that is now used by both `doclint` and the standard doclet.
> 
> There was a naming "anti-clash" -- `HtmlTag` in `doclint` vs `TagName` in the standard doclet. The resolution is to use `HtmlTag`, since the merged class is more than just the tag name.
> 
> A few minor bugs were found and fixed.   Other minor cleanup was done, but otherwise, there should be no big surprises here. But, one small item of note: `enum HtmlStyle` was split into `interface HtmlStyle` and `enum HtmlStyles implements HtmlStyle` to avoid having a doclet-specific enum class in the new `internal.html` package.  The naming follows `HtmlId` and `HtmlIds`.
> 
> There is no attempt at this time to simplify `HtmlTag` and `HtmlAttr` to remove support for older versions of HTML.

Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision:

  Address review feedback: add comments

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/19916/files
  - new: https://git.openjdk.org/jdk/pull/19916/files/2b6363ee..ff489059

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19916&range=07
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19916&range=06-07

  Stats: 39 lines in 2 files changed: 39 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/19916.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19916/head:pull/19916

PR: https://git.openjdk.org/jdk/pull/19916


More information about the compiler-dev mailing list