RFR: JDK-8303912 - Clean up JavadocTokenizer

Andrey Turbanov aturbanov at openjdk.org
Fri Mar 17 14:47:00 UTC 2023


On Thu, 9 Mar 2023 17:44:43 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.

src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java line 108:

> 106: 
> 107:         JavadocComment(CommentStyle cs, UnicodeReader reader, int pos, int endPos) {
> 108:             super(cs,  reader, pos, endPos);

Suggestion:

            super(cs, reader, pos, endPos);

src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java line 116:

> 114:      * @param length  length of meaningful content in buffer.
> 115:      */
> 116:     protected  UnicodeReader(Log log, char[] array,  int length) {

Suggestion:

    protected UnicodeReader(Log log, char[] array, int length) {

src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java line 128:

> 126:       * @param endPos  end of meaningful content in buffer.
> 127:       */
> 128:     protected  UnicodeReader(Log log, char[] array, int pos, int endPos) {

Suggestion:

    protected UnicodeReader(Log log, char[] array, int pos, int endPos) {

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

PR: https://git.openjdk.org/jdk/pull/12953


More information about the compiler-dev mailing list