Handling type arguments from outer classes for inner class in javadoc

- liangchenblue at gmail.com
Fri Jan 8 17:59:38 UTC 2021


Hello,
When I was creating tests for JDK-8259216
<https://bugs.openjdk.java.net/browse/JDK-8259216> (namely this example
<https://github.com/openjdk/jdk/pull/1997#issue-551504186>), I encountered
another problem, where instance inner class parameterized types (generics)
in javadoc omit outer classes' generic information.

An example:
Tree.java
public class Tree<T> {
    public class Node {
        T data;
        Node left;
        Node right;
        // etc..
    }
    Node root;
    // etc..
}

User.java
public class User {
    public void take(Tree<Integer>.Node now, Tree<String>.Node other) {}
    public void take(Tree<Integer> now, Tree<String> other) {}
}

Observe the javadoc method summaries (same for details) are
void take(Tree.Node now, Tree.Node other)
void take(Tree<java.lang.Integer> now, Tree<java.lang.String> other)
while it's the most reasonable from the test code above that both should
include the generic information.

Is anyone interested in filing an issue on the bugtracker? I didn't find
any relevant results there.

Best,
liangchenblue at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/javadoc-dev/attachments/20210108/d851588b/attachment-0001.htm>


More information about the javadoc-dev mailing list