On Thu, 1 Jul 2021 13:50:25 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:
> This change adds support for generating HTML links to the type arguments of > enclosing classes when creating a link to an inner class. Previously, only a > link to the inner class was created and the type arguments were even omitted > from the link label. > > The new feature to create separate links to the enclosing class and its type > arguments is only activated if the enclosing class has type arguments. If the > enclosing class is non-generic, the old behavior is preserved to create a > single link to the inner class. The reason for this is that a dedicated link > to the enclosing class itself provides little benefit, since it can be easily > reached via the "Enclosing class" link of the inner class. Also, linking the > enclosing type in absence of type arguments makes it hard to see that there > are two links and easy to click on the wrong link by mistake. > > On the other hand, for type arguments a separate link should be useful since > it is often not a "nearby" type. It is also easier to detect the different > links than for non-generic nested classes. I came to like this "mixed" > solution best after trying several other approaches. This pull request has now been integrated. Changeset: 82c256eb Author: Hannes Wallnöfer <hann...@openjdk.org> URL: https://git.openjdk.java.net/jdk17/commit/82c256eb61fdfb166e55fc3d96f8ee69bda98afb Stats: 192 lines in 12 files changed: 172 ins; 4 del; 16 mod 8259499: Handling type arguments from outer classes for inner class in javadoc Reviewed-by: jjg ------------- PR: https://git.openjdk.java.net/jdk17/pull/195