Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2298

Specific Avro compiler does not annotate generated Builder class with AvroGenerated

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.9.2
    • Component/s: java
    • Labels:
      None

      Description

      According to current AvroGenerated documentation

      All Avro generated classes will be annotated with this annotation.

      However, the nested Builder class that the specific Avro compiler generates does not get annotated with AvroGenerated or any user specified javaAnnotations. The Builder template is missing annotation generation as can be seen in the template file on Github

      This has implications for tools relying on Generated annotations, such as test coverage tools like JaCoCo, which can ignore the generated SpecificRecord class but not the nested SpecificBuilder class as a result. Here is one JaCoCo bug describing the issue.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                oasalonen Olli Salonen
                Reporter:
                oasalonen Olli Salonen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: