RFR: 8294377: Prepare to stop auto-inheriting documentation for subclasses of exceptions whose documentation is inherited [v2]
Pavel Rappo
prappo at openjdk.org
Wed Sep 28 14:04:25 UTC 2022
On Wed, 28 Sep 2022 13:34:08 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> revert an extraneous change to jdk.javadoc
>
> src/java.naming/share/classes/javax/naming/directory/InitialDirContext.java line 186:
>
>> 184: /**
>> 185: * @throws AttributeModificationException {@inheritDoc}
>> 186: */
>
> Isn't `{@inheritDoc}` needed in this case to preserve the method & params description?
Elements of a method declaration such as formal and type parameters as well as exceptions in the `throws` clause implicitly inherit descriptions, unless those elements are described in that method declaration. The same goes for the main description of a method: unless it exists in the method declaration, it is inherited.
To sum up, those descriptions you ask about are implicitly inherited. No additional javadoc markup is needed.
-------------
PR: https://git.openjdk.org/jdk/pull/10449
More information about the core-libs-dev
mailing list