Hi, Thank you for reporting and especially for the reduced complete reproducer. It definitely shows that there is something fishy worth investigation/improvement. So I created https://github.com/jacoco/jacoco/issues/1662 to do further investigations and will update it after that.
Regards, Evgeny On Tuesday, July 16, 2024 at 7:30:20 AM UTC+2 Vibor Pokupec wrote: I've pushed a new, bit simplified version of the code. The error is now on line 11. On Monday, July 15, 2024 at 9:59:02 PM UTC+2 Vibor Pokupec wrote: Hi everybody, I have a code sample on github: https://github.com/FERViborg/jacoco-bug-coverage-branch/tree/production and I tried to keep it as simple as possible but it is a bit of the complex problem. All these conditions must be met: 1. there must be try-catch with a resource 2. there must be an if statement in that try block 3. there must be a return statement with the complex object inside of that if statement When running: & "C:\Maven\3.9.1\bin\mvn.cmd" clean compile verify -f "c:\Repositories\Jacoco\pom.xml" I do not get full coverage because character *}* on line 13 of the class JacocoBadCoverageExample will report: *1 of 2 branches missed.* Is there a way to solve this? Best regards, Vibor -- 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/11a958de-218a-49fd-9cc6-ed5b0e2a0c44n%40googlegroups.com.
