Hi,

this is a known limitation, see FAQ 
<https://www.jacoco.org/jacoco/trunk/doc/faq.html>:

> Source code lines with exceptions show no coverage. Why?
> 
> JaCoCo determines code execution with so called probes. Probes are inserted 
> into the control flow at certain positions. Code is considered as executed 
> when a subsequent probe has been executed. In case of exceptions such a 
> sequence of instructions is aborted somewhere in the middle and the 
> corresponding lines of source code are not marked as covered. 


Regerds,
-marc

> On 23. Oct 2024, at 00:57, Juan Duran <[email protected]> wrote:
> 
> Hi all,
> 
> I am using Eclipse (4.32.0) on Windows with the EclEmma plugin v3.1.9. I'm 
> running JUnit test cases that cover catch statements which invoke private 
> methods.
> 
> I've noticed that the line that invokes the private method is highlighted in 
> red, while the code in the actual private method shows green. Can someone 
> confirm whether this is expected behavior?
> 
> Screenshot attached.
> 
> Thanks!
> 
> 
> 
> 
> -- 
> 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/6d1a72a2-06ca-4dc9-9a33-24718c0fe825n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/6d1a72a2-06ca-4dc9-9a33-24718c0fe825n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> <Screenshot 2024-10-22 154910.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/7EA65CEA-78D7-4830-A621-740BCF7A8F5C%40mountainminds.com.

Reply via email to