[jdk16] RFR: JDK-8251200: False positive messages about missing comments for serialization [v2]

Jonathan Gibbons jjg at openjdk.java.net
Wed Jan 6 18:52:18 UTC 2021


> 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 predicate `hasDocCommentTree` to be added.

Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - fix comment typos
 - Merge remote-tracking branch 'upstream/master' into serial
 - JDK-8251200: False positive messages about missing comments for serialization

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk16/pull/70/files
  - new: https://git.openjdk.java.net/jdk16/pull/70/files/76b61ce0..fc585281

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk16&pr=70&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk16&pr=70&range=00-01

  Stats: 3060 lines in 93 files changed: 789 ins; 2188 del; 83 mod
  Patch: https://git.openjdk.java.net/jdk16/pull/70.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk16 pull/70/head:pull/70

PR: https://git.openjdk.java.net/jdk16/pull/70


More information about the javadoc-dev mailing list