RFR: JDK-8303912 - Clean up JavadocTokenizer [v2]
Jonathan Gibbons
jjg at openjdk.org
Mon Mar 27 17:01:32 UTC 2023
On Fri, 17 Mar 2023 16:27:10 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
>> Previous work had cleaned up the JavacTokenizer, but left JavadocTokenizer alone, mostly due to its perplexing state. This is follow up work to simplify the JavadocTokenizer.
>
> Jim Laskey 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:
>
> - Corrections from review
> - Merge branch 'master' into 8303912
> - Clean up JavadocTokenizer
src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java line 1280:
> 1278: return line.accept("@deprecated") &&
> 1279: (line.isWhitespace() || line.is('*') || line.isEOLN());
> 1280: }
I note for the record that this is inadequate, given that we now skip over such content in inline tags. This is an unexpected side-effect of that change. In other words, consider a `{@code...}` tag containing a line with `@deprecated`.
I am not suggesting we do anything about it at this time, but it is worth noting.
src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java line 1311:
> 1309:
> 1310: /**
> 1311: * Trim the first part of the Javadoc comment.
Suggestion:
* Trim the first part of the JavaDoc comment.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12953#discussion_r1149548220
PR Review Comment: https://git.openjdk.org/jdk/pull/12953#discussion_r1149550710
More information about the compiler-dev
mailing list