RFR: JDK-8309964: Use directed inheritDoc for javax.lang.model API

Pavel Rappo prappo at openjdk.org
Thu Jun 15 23:34:02 UTC 2023


On Wed, 14 Jun 2023 20:05:23 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> Update javax.lang.model and javax.annotation.processing to use directed inheritDoc.

src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java line 121:

> 119:      * @return  {@inheritDoc ElementVisitor}
> 120:      * @throws UnknownElementException
> 121:      *          a visitor implementation may optionally throw this exception

If documenting that exception is intentional, I'd suggest DRY-ing that comment even more: 

@throws UnknownElementException {@inheritDoc ElementVisitor}

src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java line 152:

> 150:      * @param p  {@inheritDoc TypeVisitor}
> 151:      * @return a visitor-specified result
> 152:      * @throws UnknownTypeException

Similar comment about inheriting exception info.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14477#discussion_r1231621200
PR Review Comment: https://git.openjdk.org/jdk/pull/14477#discussion_r1231621876


More information about the compiler-dev mailing list