Integrated: JDK-8299896: Reduce enum values of HtmlLinkInfo.Kind
Hannes Wallnöfer
hannesw at openjdk.org
Fri Jan 20 14:53:44 UTC 2023
On Thu, 12 Jan 2023 16:20:10 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
> Please review this change to drastically reduce the number of enum values in `HtmlLinkInfo.Kind` used to describe the format of a JavaDoc link. Previously the enum values were specific to the context in which a link was used. The new values describe the link format, such as whether to include preview information or type parameters or bounds. Other link properties that previously depended on this enum were moved into separate boolean flags as they are orthogonal to the link format and would have needlessly inflated the enum class. In some other cases the calling code had to be adapted slightly to generate the desired output.
>
> Apart from passing the tests, I made sure the new code generates the exact same output for the JDK documentation as the old code. Doing so I noticed that some generated links were not previously covered by tests. I added tests for these in the existing `TestInterface.java`.
This pull request has now been integrated.
Changeset: b2d36221
Author: Hannes Wallnöfer <hannesw at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b2d3622115ce0b4c0647c7b79f28c075dfcdebbc
Stats: 502 lines in 26 files changed: 117 ins; 221 del; 164 mod
8299896: Reduce enum values of HtmlLinkInfo.Kind
Reviewed-by: jjg
-------------
PR: https://git.openjdk.org/jdk/pull/11972
More information about the javadoc-dev
mailing list