RFR: JDK-8273244: Improve diagnostic output related to ErroneousTree [v2]
Jonathan Gibbons
jjg at openjdk.java.net
Wed Sep 22 14:59:07 UTC 2021
On Wed, 22 Sep 2021 10:29:13 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> Jonathan Gibbons has updated the pull request incrementally with one additional commit since the last revision:
>>
>> revert unrelated debug edit
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java line 269:
>
>> 267: DCTree dcTree = (DCTree) tree;
>> 268: if (dcComment.getSourcePosition(dcTree.getEndPosition()) == 0) {
>> 269: System.err.println("WARNING: comment:" + dcComment.comment + ": " + dcTree.getKind() + " end:" + dcTree.getEndPosition() + " result: " + dcComment.getSourcePosition(dcTree.getEndPosition()));
>
> This looks like a leftover debugging aid.
Oops. Thanks
> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java line 971:
>
>> 969: /**
>> 970: * Creates an {@code ErroneousTree} node, for a range of text starting at a given position,
>> 971: * ending at the last non-white character before the current position,
>
> In this file and in JDK overall, such characters as predominantly called "non-whitespace".
Will fix.
> src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DCTree.java line 74:
>
>> 72: * </ul>
>> 73: *
>> 74: * All are values relative to the beginning of the
>
> Transposition error? "All values are relative..."
Noted
> src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DCTree.java line 88:
>
>> 86: /**
>> 87: * The position of the first character that is unique to this node.
>> 88: * It is normally set by the methods in {@link DocTreeMaker}.
>
> Since this change also includes cleanup, we might as well fix "the the" and "non-white space" at DocTreeMaker.java:699.
Noted
-------------
PR: https://git.openjdk.java.net/jdk/pull/5510
More information about the javadoc-dev
mailing list