JDK-8251200: False positive messages about missing comments for serialization #70
Conversation
👋 Welcome back jjg! A progress list of the required criteria for merging this PR into |
@jonathan-gibbons The following label will be automatically applied to this pull request:
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. |
Webrevs
|
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.
Looks good, apart from two typos in a comment.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
Outdated
Show resolved
Hide resolved
/** | ||
* Checks whether an element has an associated doc copmment. | ||
* @param element the element | ||
* @return {@code true} if the eleme nt has a comment, and false otherwise |
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.
typo: eleme nt
@jonathan-gibbons 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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
Looks good, saw the same typos Hannes noted. |
/integrate |
@jonathan-gibbons Pushed as commit eef43be. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Using the
@serial
tag, a class can explicitly opt-in to being documented on the serialized form page. However, a class that does not want to opt-in should not be required to have a doc comment, and should not trigger the "missing comment" warning if there is no comment.The fix is to check for the presence of the comment on a class before analyzing it to see if it contains
@serial
tags.The code in
Utils.getDocCommentTree0
is slightly refactored to allow a new predicatehasDocCommentTree
to be added.Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk16 pull/70/head:pull/70
$ git checkout pull/70