Integrated: JDK-8261263: Simplify javadoc link code

Hannes Wallnöfer hannesw at openjdk.java.net
Tue Feb 9 13:10:29 UTC 2021


On Fri, 5 Feb 2021 20:59:45 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

> This is a cleanup of the javadoc link generating code.
> 
> There is a simple "horizontal" component to this change that removes the `strong` parameters from most `HtmlDocletWriter#getDocLink` methods which where the value used was always `false`, and related changes in all the code using these methods. 
> 
> The slightly more complex part of this change are changes in `LinkInfo[Impl]` and `LinkFactory[Impl]`. Here the target was to reduce the number of booean fields in `LinkInfo` and their interaction with the code, which was quite hard to grasp. I managed to replace several fields controlling generation of type parameter links with a single `includeTypeParameterLinks()` method. The use of this method and the remaining boolean fields in the code is quite straightforward. 
> 
> I also removed some bits of dead code and simplified the control flow a bit by trying to do things only in one place and one way when possible.
> 
> The code passes all javadoc tests and generates documentation identical to the old code.

This pull request has now been integrated.

Changeset: b0e7e5ab
Author:    Hannes Wallnöfer <hannesw at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/b0e7e5ab
Stats:     257 lines in 15 files changed: 41 ins; 153 del; 63 mod

8261263: Simplify javadoc link code

Reviewed-by: jjg

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

PR: https://git.openjdk.java.net/jdk/pull/2437


More information about the javadoc-dev mailing list