Open GoogleCodeExporter opened 9 years ago
Issue confirmed.
I've the same enviroment (Lombok 1.12.2 + Java 7 + Jacoco + TestNG + SonarQube).
Original comment by pang...@gmail.com
on 16 Oct 2013 at 4:32
Can you tell me what change triggered this result? I mean, what code do we now
generate differently?
Original comment by r.spilker
on 20 Nov 2013 at 1:44
Still happens with 1.12.4 (after upgrading from 0.12.0).
Using Java 7, Jacoco, JUnit, SonarQube.
Original comment by and.svan...@gmail.com
on 28 Feb 2014 at 9:24
The issue is still there after so long... if there is an accepted solution I
can help implement it. Would a marking annotation work?
Original comment by rlogia...@gmail.com
on 12 Jun 2014 at 3:49
This not a lombok issue.
The generated code needs to be covered by the UTs or ITs as it had been
manually written.
Lombok cannot fix that even it combined amount of branches in the generated
code is high.
Original comment by fabrice....@gmail.com
on 18 Jul 2014 at 10:48
@fabrice:
In that case we would've to test each and every branch of the generated code,
which can be very high (more than 200 in on of the case)
Can't there be a way by which lombok can mark them and Jacoco understands not
to include marked for code coverage.
Original comment by pops7...@gmail.com
on 10 Feb 2015 at 9:53
Would it be possible to generate a boilerplate test for boilerplate code?
Perhaps add a new annotation like:
@EqualsAndHashCodeTest
that would generate a Junit test for the annotated private member? See
https://gist.github.com/rherrmann/2970842
For instance:
@EqualsAndHashCodeTest
private Point point = new Point(1,2);
Would generate:
@Test
private void boilerPlateLombokEqualsAndHashCodeTest () {
EqualsTester<Point> equalsTester = newInstance( new Point( 1, 2 ) );
equalsTester.assertEqual( new Point( 1, 2 ), new Point( 1, 2 ) );
equalsTester.assertNotEqual( new Point( 1, 2 ), new Point( 3, 4 ) );
}
Original comment by ge...@umich.edu
on 13 Apr 2015 at 8:51
Original issue reported on code.google.com by
piderman@gmail.com
on 11 Oct 2013 at 11:37Attachments: