Marc R. Hoffmann

Results 355 comments of Marc R. Hoffmann

Class compiled with JDK: ``` private void implicitExceptionAfterForLoop(); 0 iconst_0 1 istore_1 [i] 2 iload_1 [i] 3 iconst_3 4 if_icmpge 16 7 invokestatic org.jacoco.core.test.validation.targets.Stubs.nop() : void [13] 10 iinc 1...

Reproducer is here: https://gist.github.com/marchof/c6f1b18c371f6e69622c

@Godin Let's try -- though not sure whether I'll find a proper solution.

Another reproducer shows the problem with ECJ as well as with javac. No branches are shown as covered for the if statement: ``` private void implicitExceptionAfterBranch() { if (f()) {...

@Godin It is. The situation is tricky here as beside the label for the new line we have another label for the control flow.

@Godin Can you please do the following sanity check: What is the total number of probes e.g. in org.jacoco.core without and with this patch? Should be a small increase only....

@Godin Maybe we prepare the fix and let it sit here until we have another reason for a breaking change. Sidenote: For the filtering story I would consider reworking the...

@Godin Yep, I think this is a valid fix. A increase of 3,5% in probes probably reflects exactly the cases we missed before. So we only need to fix your...

Hi @DanielThomas unfortunatelly it is not possible to implement a Java agent with on-the-fly instrumentation without any side effects. We need a way of communication between the instrumented classes and...

@DanielThomas As said before, contributions for this are welcome! If you [build](https://www.jacoco.org/jacoco/trunk/doc/build.html) JaCoCo there is a quite extensive (integration) test suite, so you will immediately see whether other approaches work.