Olli Salonen created AVRO-2298:
----------------------------------
Summary: Specific Avro compiler does not annotate generated
Builder class with AvroGenerated
Key: AVRO-2298
URL: https://issues.apache.org/jira/browse/AVRO-2298
Project: Apache Avro
Issue Type: Bug
Components: java
Affects Versions: 1.8.2
Reporter: Olli Salonen
According to current [AvroGenerated
documentation|[https://avro.apache.org/docs/1.8.2/api/java/org/apache/avro/specific/AvroGenerated.html],]
{quote}All Avro generated classes will be annotated with this annotation.
{quote}
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|[https://github.com/apache/avro/blob/7ed38d7c7e150987ef8bf035196576fc158e03eb/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm#L296].]
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|https://github.com/jacoco/jacoco/issues/814].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)