RFR: JDK-8249634: doclint should report implicit constructor as missing javadoc comments

Jonathan Gibbons jjg at openjdk.java.net
Tue Jul 6 18:40:16 UTC 2021


Please review a simple update to doclint, to generate messages for the "effectively missing" comment on default constructors on "normal" classes (not enums classes or record classes.)

The change does affect a bunch of tests, mostly doclint tests, which all use atypical "toy" classes to host the comments to be tested, and which generally do not have explicit constructors ... and so trigger the new warning about using default constructors.

There is no one solution applied to all tests. The general theme of the changes is to minimize the changes, and in almost all cases to avoid changing any "golden files" or "expected output".

The following techniques are used to modify tests:

where it does not significantly interact with other test options, disable the check for missing comments when that is not the primary function of the test
where it would not affect any line numbers in any expected output, add an explicit no-args constructor at the end of the class body
add an explicit no-args constructor on the same line as the opening { of the class body (i.e.in order not to change line numbers in reference output)

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

Commit messages:
 - fix trailing whitespace
 - JDK-8249634: doclint should report implicit constructor as missing javadoc comments

Changes: https://git.openjdk.java.net/jdk/pull/4695/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4695&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8249634
  Stats: 235 lines in 76 files changed: 121 ins; 4 del; 110 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4695.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4695/head:pull/4695

PR: https://git.openjdk.java.net/jdk/pull/4695


More information about the javadoc-dev mailing list