Integrated: JDK-8258957: DocLint: check for HTML start element at end of body

Jonathan Gibbons jjg at openjdk.java.net
Thu Mar 25 00:02:18 UTC 2021


On Fri, 5 Mar 2021 21:44:20 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

> Please review a moderately simple fix to improve DocLint's checking for empty tags, and in particular, bad use of `<p>` as a paragraph terminator. This will help detect this bad usage at doclint-time, instead of later, with doccheck.
> 
> There was already code to check if tags were empty. (`warnIfEmpty`), and code to check for open tags at the end of the comment. The change is primarily to invoke the "check for open tags" at the end of main body of a comment and at the end of each block tag (i.e including all that allow HTML content in the body of the block tag.) 
> 
> There is a secondary minor edit to check if a tag was empty when auto-closing it.
> 
> The changes discovered 5 instances of bad use of `<p>` in the JDK docs. These are being fixed separately in https://bugs.openjdk.java.net/browse/JDK-8263104

This pull request has now been integrated.

Changeset: 0ff81682
Author:    Jonathan Gibbons <jjg at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/0ff81682
Stats:     85 lines in 5 files changed: 82 ins; 1 del; 2 mod

8258957: DocLint: check for HTML start element at end of body

Reviewed-by: vromero

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

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


More information about the compiler-dev mailing list