RFR: JDK-8227923: End position of EndElementTree is -1
Jonathan Gibbons
jonathan.gibbons at oracle.com
Thu Jul 18 18:44:25 UTC 2019
The patch looks OK for the problem it is addressing, but it shows up a
probably-unrelated bug in DocCommentParser.
Look at these lines in
http://cr.openjdk.java.net/~jlahoda/8227923/webrev.00/test/langtools/tools/javac/doctree/positions/TestPosition.out.sdiff.html:
94 TEXT:
95 *
96 *!trailing-whitespace!
This seems to indicate that leading <space><asterisk> were not being
skipped as they should be. This needs to be looked at, but can be done
separately from this fix.
-- Jon
On 07/18/2019 08:53 AM, Jan Lahoda wrote:
> Hi,
>
> The end position of some DocTrees (namely EndElementTree, EntityTree
> and CommentTree) is reported as -1 from
> DocTrees.getEndPosition(CompilationUnitTree, DocCommentTree, DocTree)
>
> For EntityTree and CommentTree, the end position can be currently
> computed easily. For EndElementTree, the proposal is to record the end
> position during parsing, as is done for the corresponding
> StartElementTree.
>
> Proposed webrev: http://cr.openjdk.java.net/~jlahoda/8227923/webrev.00/
> JBS: https://bugs.openjdk.java.net/browse/JDK-8227923
>
> How does this look?
>
> Thanks,
> Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20190718/f5206409/attachment.html>
More information about the compiler-dev
mailing list