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

SourcePositions are wrong for Strings concatenated with '+' operator

XMLWordPrintable

    • b18

        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

          1. Class1.java
            5 kB
            Keimpe Bronkhorst

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

                Created:
                Updated:
                Resolved: