Closed carlphilipp closed 1 year ago
Lombok marks everything it generates with this annotation. Why should it do the same for record components? This is a problem in JaCoCo and will also happen without lombok.
Thanks @pzygielo I bumped jacoco to latest snapshot and it seems that the report is correct now!
Describe the bug When using:
and:
I would expect that the generated code contains the
@Generated
annotation on the method:Now, I guess this is debatable, as this is a method part of the record. I'm not too sure how that works internally, but maybe the other solution would be to not have that method at all in the generated record?
The root of the issue here is that by switching from normal class with
@Builder
to record with@Builder
, we end-up having some code not covered with JaCoCo. At first sight it did not make a lot of sense why.To Reproduce I have created a sample project here. Just run
And you can check the generated classes and also jacoco report.
Version info (please complete the following information):