RFR: 8287333: Clean up ParamTaglet and ThrowsTaglet [v3]
Pavel Rappo
prappo at openjdk.java.net
Tue Jun 7 00:39:06 UTC 2022
On Mon, 6 Jun 2022 21:27:25 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Pavel Rappo has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Remove upper-bounded wildcard
>>
>> This change simplifies code without any disadvantages:
>>
>> * Those `List<? extends XTree>` are read-only
>> * An argument of the `List<XTree>` type can still be passed to a `List<? extends XTree>` parameter
>> - Simplify inheritThrowsDocumentation
>> - Reuse more specific variable
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java line 92:
>
>> 90: ? utils.getTypeParamTrees(ee)
>> 91: : utils.getParamTrees(ee);
>> 92: List<? extends Element> parameters = input.isTypeVariableParamTag
>
> Change both or neither; don't leave the code inconsistent
I'm not sure why list of parameter trees have to be the same as list of elements. I can change (methods such as) `Utils#getTypeParamTrees`, but I cannot change (methods such as) `ExecutableElement#getTypeParameters` (sadly). Useless bounded wildcards clutter code.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8886
More information about the javadoc-dev
mailing list