-
Bug
-
Resolution: Unresolved
-
P4
-
None
Re: discussion in https://github.com/openjdk/jdk/pull/12372#discussion_r1099142881
In doc comments, `{@return...}` and `{@summary...}` should each appear at the beginning of a doc comment.
In `Checker.java`, `visitReturn` and `visitSummary` use different methodology for checking the position.
* `visitReturn` simply checks that the node is the first child of the first sentence of the enclosing `DocCommentTree`
* `visitSummary` tries to be more lenient and allows the node to appear after whitespace text, but in so doing allows through some edge cases (entity or escape immediately before the summary node.)
The reported errors are different as well: `dc.return.not.first`, `dc.invalid.summary`.
It would be good to align the handling for these two kinds of tree nodes.
In doc comments, `{@return...}` and `{@summary...}` should each appear at the beginning of a doc comment.
In `Checker.java`, `visitReturn` and `visitSummary` use different methodology for checking the position.
* `visitReturn` simply checks that the node is the first child of the first sentence of the enclosing `DocCommentTree`
* `visitSummary` tries to be more lenient and allows the node to appear after whitespace text, but in so doing allows through some edge cases (entity or escape immediately before the summary node.)
The reported errors are different as well: `dc.return.not.first`, `dc.invalid.summary`.
It would be good to align the handling for these two kinds of tree nodes.