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

javac uses record components source position during compilation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 24
    • None
    • tools
    • b08

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: