Ok. In this case what you see is the code of the lambda body. Technically the 
compiler creates a method for it which is not excluded. I’m afraid this is a 
limitation of the @Generated annotation.


> On 24. Jun 2022, at 19:33, tuk <[email protected]> wrote:
> 
> Just to add in the method level summary the excluded method is not showing up 
> (get() method is missing). But when I go inside the class then the uncovered 
> code is shown in red. 
> 
> 
> <excluded.png>
> On Friday, 24 June 2022 at 20:39:56 UTC+5:30 tuk wrote:
> Yes, it has. 
> 
> package com.spotnana.common;
> 
> import java.lang.annotation.ElementType;
> import java.lang.annotation.Retention;
> import java.lang.annotation.RetentionPolicy;
> import java.lang.annotation.Target;
> 
> 
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface ExcludeFromJacocoGeneratedReport {}
> 
> On Friday, 24 June 2022 at 18:20:12 UTC+5:30 Marc R. Hoffmann wrote:
> Hi,
> 
> can you please double check that your annotation has the retention policy 
> <https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/annotation/RetentionPolicy.html>
>  CLASS or RUNTIME?
> 
> regards,
> -marc
> 
> 
> 
>> On 24. Jun 2022, at 14:01, tuk <[email protected] <>> wrote:
>> 
> 
>> I have added a filter via annotation to exclude a method from jacoco 
>> coverage as mentioned here <https://stackoverflow.com/a/66918619>.
>> 
>> But when I see the jacoco html report for coverage I see the filtered method 
>> being shown in red as not covered. Please check the attached screenshot. Is 
>> this expected?
>> 
>> Jacoco Version - 0.8.8
>> 
> 
>> <Screenshot 2022-06-24 at 5.30.07 PM.png>
>> 
> 
>> -- 
>> 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/05fca62e-c828-4bea-97ab-0f6b4c30560fn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jacoco/05fca62e-c828-4bea-97ab-0f6b4c30560fn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> <Screenshot 2022-06-24 at 5.30.07 PM.png><Screenshot 2022-06-24 at 5.30.07 
>> PM.png>
> 
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/5a0ef445-7768-4a16-855d-239eeceee5a2n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/5a0ef445-7768-4a16-855d-239eeceee5a2n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> <excluded.png>

-- 
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/B8E2D368-CA34-4F43-A674-290D743C095A%40mountainminds.com.

Reply via email to