javac uses record components source position during compilation

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 24
    • Affects Version/s: None
    • Component/s: tools
    • b08

      javac uses the source position of record components to remove a particular record component during compilation. This could happen several times if annotation processors are present. This is done in part to provide better error messages for silly record definitions like:

      record R(int i, float i) {} // two record components with the same name

      but this is brittle and can backfire if the record is read from the class file during compilation as the source positions are not stored in the class file. See JDK-8332297 for some context

            Assignee:
            Vicente Arturo Romero Zaldivar
            Reporter:
            Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: