Integrated: JDK-8259283: use new HtmlId and HtmlIds classes
Jonathan Gibbons
jjg at openjdk.java.net
Wed Jan 13 17:05:06 UTC 2021
On Wed, 6 Jan 2021 00:12:04 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
> Please review this change to centralize the management of HTML ids used by the standard doclet in a single new factory class, `HtmlIds`, which utilizes a new type-safe wrapper class around `String` called `HtmlId`.
>
> The new classes are used both when declaring ids (e.g. `HtmlTree.setId`) and when referencing them (e.g. `Links.createLink`). The enum `SectionName`, which declared a set of standard ids, goes away, as do methods in `Links` and other places to create "anchors".
>
> This is a simple refactoring: there is no intentional change of functionality, and no tests are affected or need to be updated. However, the changes do highlight the inconsistency of the use of ids: it would be good to rationalize these in separate, targeted follow-up work.
This pull request has now been integrated.
Changeset: 916ab4e7
Author: Jonathan Gibbons <jjg at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/916ab4e7
Stats: 1022 lines in 39 files changed: 553 ins; 293 del; 176 mod
8259283: use new HtmlId and HtmlIds classes
Reviewed-by: hannesw
-------------
PR: https://git.openjdk.java.net/jdk/pull/1951
More information about the javadoc-dev
mailing list