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

SourcePositions are wrong for Strings concatenated with '+' operator

    XMLWordPrintable

Details

    • b18

    Backports

      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

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

                Dates

                  Created:
                  Updated:
                  Resolved: