Hi,

a workaround might be to use JaCoCo offline instrumentation before ApectJ is applied.

In general JaCoCo is fully based on Java class files. Due to this design choice the JaCoCo agent sees class exactly the way how they get executed. With offline instrumentation in some situation JaCoCo instrumentation can be applied before other tools modify the class files.

Regards,
-marc

On 19.05.17 20:38, [email protected] wrote:
I have a project using build-time AspectJ to apply "around" advice to a method.  The AspectJ compiler 
renames/mangles the original method name (e.g., from "method" to "method_aroundBody0"), changes it 
to static and passes the instance var as the first parameter, adds the Synthetic class attribute, and creates a new 
method with the original name that does before/after logic and ultimately delegates to the new 
"method_aroundBody0" method.  Of course, the Synthetic class attribute means that JaCoCo ignores execution 
data for that method.

The behaviors of AspectJ and JaCoCo seem reasonable in isolation, but their 
interaction is unhelpful.  What can we do about this situation?  If the AspectJ 
compiler added metadata so JaCoCo could know that a method is renamed, would it 
be acceptable to read that metadata in the analyzer?  Other thoughts?


--
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/d4156256-7e5a-5d2a-bc43-616d0f0d5dc3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to