RFR: 8282483: Ensure that Utils.getAllInterfaces returns unique instances
Jonathan Gibbons
jjg at openjdk.java.net
Wed Mar 2 22:13:17 UTC 2022
On Wed, 2 Mar 2022 22:08:37 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java line 919:
>>
>>> 917: TypeElement e = asTypeElement(t);
>>> 918: if (isInterface(e)) {
>>> 919: if ((isPublic(e) || isLinkable(e)) && visited.add(typeUtils.asElement(t))) {
>>
>> Don't you always want to record you've visited the item, whether or not it is public or linkable? Would it be better to put the new `&& expr` in the previous `if` expression?
>>
>> or even `if (isInterface(e) && visited.add(e)) ...`
>
> It would achieve the goal either way. However, your suggestion might look cleaner; I'll try it shortly.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7659
More information about the javadoc-dev
mailing list