-
Notifications
You must be signed in to change notification settings - Fork 6.2k
JDK-8258602: JavaDoc field summary does not indicate final modifier #3716
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
Conversation
|
👋 Welcome back hannesw! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
Hi Hannes, out of curiosity - for a final class, will all members (or none) appear final in the generated documentation? Or will it depend on whether a redundant |
Yes, |
This seems surprising and maybe questionable, since in other places, javadoc tries to present a normalized view of modifiers. But, I agree it is in line with existing behavior, and this issue is not about changing that behavior at this time. |
jonathan-gibbons
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, but we might want to think about the pros and cons of normalizing modifiers.
|
@hns This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 94 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Thanks for the review; I agree we should think about normalizing modifiers. FWIW, the JLS describes methods in final classes as merely "behaving as if they were final" (8.4.3.3.), so at least technically it is still the modifier that decides. Other constructs are actually declared as implicitly final, with some of them allowing the modifier (such as constants in interfaces) and some not (enums). Here I think we usually show modifiers if they are allowed, although I haven't done a systematic review. |
|
/integrate |
|
@hns Since your change was applied there have been 98 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 07ecd42. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
I would be concerned that adding (or removing) a redundant |
I found that adding the
finalmodifier does not add too much visual noise to the documentation. I didn't find any occurrence where there were more than two modifiers on a member summary (usually eitherstatic finalorprotected final).On the other hand, I do think the
finalmodifier adds important information about the member. Although this is more true for fields than for other members, for reasons of consistency I decided to show it for all kinds of members except for those where it is not allowed (such as for enums).To my surprise I also noticed that there weren't any test cases for field summaries, so I added a new test.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3716/head:pull/3716$ git checkout pull/3716Update a local copy of the PR:
$ git checkout pull/3716$ git pull https://git.openjdk.java.net/jdk pull/3716/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3716View PR using the GUI difftool:
$ git pr show -t 3716Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3716.diff