Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8341904: Search tag in inherited doc comment creates additional index item #21765

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hns
Copy link
Member

@hns hns commented Oct 29, 2024

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}.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8341904: Search tag in inherited doc comment creates additional index item (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21765/head:pull/21765
$ git checkout pull/21765

Update a local copy of the PR:
$ git checkout pull/21765
$ git pull https://git.openjdk.org/jdk.git pull/21765/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21765

View PR using the GUI difftool:
$ git pr show -t 21765

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21765.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 29, 2024

👋 Welcome back hannesw! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 29, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 29, 2024
@openjdk
Copy link

openjdk bot commented Oct 29, 2024

@hns The following label will be automatically applied to this pull request:

  • javadoc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@mlbridge
Copy link

mlbridge bot commented Oct 29, 2024

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javadoc [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant