RFR: 8338133: Cleanup direct use of `new HtmlTree` [v3]

Jonathan Gibbons jjg at openjdk.org
Wed Sep 4 15:56:55 UTC 2024


> Please review an update to "clean up" the direct use of HtmlTree constructors.
> 
> Hitherto, many/most instances of `HtmlTree` were created by static factory methods.  This update extends that convention.
> In most cases, this is by providing either simple no-arg factory methods or commonly used overloads that take an `HtmlId` or `HtmlStyle`.
> 
> For some tags, (`br`, `hr`, `wbr`) this allows a singleton instance to be used.
> For some of the more obscure cases, a more generic `HtmlTree.of(HtmlTag)` method was used.
> 
> Notes:
> * some significant block-level nodes, like `pre`, should probably always set a style, which could be enforced by suitable factory methods. That is currently not the case and could be a future cleanup.
> * some lists put the same style info on each list item, but might be better placed on the enclosing list. That could be a future cleanup

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

  remove unintentional blank line

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/20778/files
  - new: https://git.openjdk.org/jdk/pull/20778/files/a8cd49fe..f84c1ec4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20778&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20778&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/20778.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20778/head:pull/20778

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


More information about the javadoc-dev mailing list