Please read documentation, this is described in FAQ 
( https://www.jacoco.org/jacoco/trunk/doc/faq.html ) :

My code uses reflection. Why does it fail when I execute it with JaCoCo?

To collect execution data JaCoCo instruments the classes under test which 
adds two members to the classes: A private static field $jacocoData and a 
private static method $jacocoInit(). Both members are marked as synthetic.

*Please change your code to ignore synthetic members.* This is a good 
practice anyways as also the Java compiler creates synthetic members in 
certain situation.

On Saturday, February 2, 2019 at 8:15:16 PM UTC+1, 
[email protected] wrote:
>
> I've written a pretty printing library 
> https://github.com/snowe2010/pretty-print 
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fsnowe2010%2Fpretty-print&sa=D&sntz=1&usg=AFQjCNFzwDh21UNeIhMYNkRUyN-fSvwILg>
> ,
> and am trying to get code cov for it. As soon as I add jacoco, all my 
> tests fail because reflection now finds extra `$jacocoData =  boolean[]()` 
> objects pretty much everywhere. 
>
> Is there any way around this, or will I just not be able to use jacoco? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/f0f59301-913b-44ae-9114-9a3e933008e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to