RFR: 8283864: Clean up DocFinder and friends

Pavel Rappo prappo at openjdk.java.net
Thu Apr 14 11:35:20 UTC 2022


On Wed, 13 Apr 2022 23:11:15 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> A clean-up to facilitate more clean-up in the future.
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritDocTaglet.java line 89:
> 
>> 87:                 ? null
>> 88:                 : configuration.tagletManager.getTaglet(ch.getTagName(holderTag));
>> 89:         if (taglet != null && !(taglet instanceof InheritableTaglet)) {
> 
> Optional, this is a possible use case for patterns in `instanceof` ... you could declare a name here and save the cast on line 95

I think `taglet != null` gets in the way. I tried to change the order of conjuncts, but to no avail: flow scoping analysis seems to give up. Might be something that the compiler folks can comment on.

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

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


More information about the javadoc-dev mailing list