The only taglet that along with its own tag needs to know the immediately enclosing tag is `InheritDocTaglet`:
@return {@inheritDoc} @throws NullPointerException {@inheritDoc} @param p {@inheritDoc} However, the immediately enclosing tag is unconditionally passed to all taglets. If we stop passing it and make `InheritDocTaglet` compute it instead, the code becomes cleaner. While reviewing, particularly note these benefits of the proposed change: * taglet-handling code knows less about `@inheritDoc`, and * `InheritDocTaglet` receives its own tag, not the tag that encloses it ------------- Commit messages: - (cleanup) Simplify retrieveInheritedDocumentation - (cleanup) Clarify retrieveInheritedDocumentation - (cleanup) Unify specs of commentTagsToContent - Stop passing "holderTag" - (cleanup) Remove useless null check Changes: https://git.openjdk.java.net/jdk/pull/8361/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8361&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285470 Stats: 74 lines in 7 files changed: 6 ins; 26 del; 42 mod Patch: https://git.openjdk.java.net/jdk/pull/8361.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8361/head:pull/8361 PR: https://git.openjdk.java.net/jdk/pull/8361