Details
-
Bug
-
Resolution: Fixed
-
P4
-
7, 8, 11, 14, 15
-
b18
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8299653 | 11.0.19-oracle | Ramesh Gangadhar | P4 | Resolved | Fixed | b01 |
JDK-8302646 | 11.0.19 | Goetz Lindenmaier | P4 | Resolved | Fixed | b03 |
Description
SourcePositions reports the wrong start/end offsets for ExpressionTrees containing Strings concatenated with '+' operator, and in some cases (annotation arguments) the end offset is -1.
Compile and run the attached program with tools.jar in the classpath.
It prints out:
Annotation argument: + "ll") pu
StartOffset: 22
EndOffset: -1
Field init: + "ll"
StartOffset: 86
EndOffset: 92
Compile and run the attached program with tools.jar in the classpath.
It prints out:
Annotation argument: + "ll") pu
StartOffset: 22
EndOffset: -1
Field init: + "ll"
StartOffset: 86
EndOffset: 92
Attachments
Issue Links
- backported by
-
JDK-8299653 SourcePositions are wrong for Strings concatenated with '+' operator
- Resolved
-
JDK-8302646 SourcePositions are wrong for Strings concatenated with '+' operator
- Resolved
- relates to
-
JDK-8024098 javac syntax tree should more closely model the source code
- Open
-
JDK-8031725 No way to detect synthetic com.sun.source.tree.Tree's
- Resolved
(1 links to)