Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8035787

SourcePositions are wrong for Strings concatenated with '+' operator

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b18

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jlahoda Jan Lahoda
              Reporter:
              kbronkho Keimpe Bronkhorst (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: