On Mon, 8 Apr 2024 21:12:42 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

>> Please review a patch to add support for Markdown syntax in documentation 
>> comments, as described in the associated JEP.
>> 
>> Notable features:
>> 
>> * support for `///` documentation comments in `JavaTokenizer`
>> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` 
>> library
>> * updates to `DocCommentParser` to treat `///` comments as Markdown
>> * updates to the standard doclet to render Markdown comments in HTML
>
> Jonathan Gibbons has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   add support for JDK-8329296: Update Elements for '///' documentation 
> comments

Changes for 21f5b00 mostly look good, but I'm not a compiler person.

src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java 
line 443:

> 441:     @DefinedBy(Api.LANGUAGE_MODEL)
> 442:     public CommentKind getDocCommentKind(Element e) {
> 443:         return  getDocCommentItem(e, ((docCommentTable, tree) -> 
> docCommentTable.getCommentKind(tree)));

Nit:
Suggestion:

        return getDocCommentItem(e, ((docCommentTable, tree) -> 
docCommentTable.getCommentKind(tree)));

src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java 
line 443:

> 441:     @DefinedBy(Api.LANGUAGE_MODEL)
> 442:     public CommentKind getDocCommentKind(Element e) {
> 443:         return  getDocCommentItem(e, ((docCommentTable, tree) -> 
> docCommentTable.getCommentKind(tree)));

Again:
Suggestion:

        return getDocCommentItem(e, ((docCommentTable, tree) -> 
docCommentTable.getCommentKind(tree)));

src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocCommentTable.java 
line 55:

> 53: 
> 54:     /**
> 55:      * Get the plain text of the doc comment, if any, for a tree node.

This is likely a copy-pasted comment.

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

PR Review: https://git.openjdk.org/jdk/pull/16388#pullrequestreview-1988489764
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1557248565
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1557249290
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1557444619

Reply via email to