RFR: 8285470: Improve handling of @inheritDoc
Pavel Rappo
prappo at openjdk.java.net
Fri Apr 22 14:13:54 UTC 2022
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
More information about the javadoc-dev
mailing list