RFR: 8341904: Search tag in inherited doc comment creates additional index item [v2]
Pavel Rappo
prappo at openjdk.org
Fri Nov 8 17:29:13 UTC 2024
On Fri, 8 Nov 2024 17:06:17 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
>> Please review a change to avoid generation of index items for comments inherited from overridden methods. This affects `{@index}`, `{@systemProperty}`, and `@spec` tags in both implicitly and explicitly doc comments.
>>
>> The change adds two additional means for avoiding generation of index items which partially overlap:
>>
>> - Adding the `inheritDoc` tag to the current `TagletWriter.Context` when rendering an inherited doc comment
>> - Comparing the element's type element with the type element currently being documented
>>
>> The second check is necessary for implicitly inherited doc comments (e.g. overriding a method without doc comment), while usage of `{@inheritDoc}` tag is detected by checks. I still decided to add the `inheritDoc` tag constant to `TagletWriter.Context` since it is explicit, uses a mechanism that was created for the purpose, and might be useful in other places.
>>
>> There was a test case for the previous (buggy) behaviour to add a search tag index item using the overridden method signature as label. I changed the expected behaviour and added another method to cover usage of the `{@systemProperty}` tag in combination with `{@inheritDoc}`.
>
> Hannes Wallnöfer has updated the pull request incrementally with one additional commit since the last revision:
>
> Address review feedback
Marked as reviewed by prappo (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/21765#pullrequestreview-2424472744
More information about the javadoc-dev
mailing list