On Wed, 13 Apr 2022 23:11:15 GMT, Jonathan Gibbons <j...@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