Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » EMMA and AspectJ
EMMA and AspectJ [message #72028] Tue, 22 July 2008 06:29 Go to next message
Eclipse User
Originally posted by: uwe.g.live.de

Hi,

when the code coverage tool EMMA is run on AspectJ-advised code, the
reported line coverage for methods with around-advices is always 100% (if
it was called at all), and the reported number of lines is always 1 (one).

I found some posts about problems with missing line numbers in byte code.
This however seems not to be the problem here - in my test there are no
other 3rd party jars involved except emma and aspectj. The decompiled byte
code also shows the line numbers.

A work-around is to instrument first with emma, then weave the aspects.
But this messes up out production process, and omits the aspects from
coverage analysis.

Do you know this problem - and a solution?

Thanks & regards
Uwe
Re: EMMA and AspectJ [message #72047 is a reply to message #72028] Tue, 29 July 2008 19:22 Go to previous message
Andrew Clement is currently offline Andrew Clement
Messages: 162
Registered: July 2009
Senior Member
Hi Uwe,

I should say you will get a faster response on the mailing list rather
than the newsgroup - I only check this once a week or so.

We have had issues with code coverage tools and made changes where
appropriate (generating line number tables for some methods to keep the
tools happy). I'm not aware of any outstanding issues in this area. When
you say:

> When the code coverage tool EMMA is run on AspectJ-advised code, the
reported line coverage for
> methods with around-advices is always 100% (if it was called at all), and
the reported number of lines
> is always 1 (one).

what would you be expecting it to be, for example? Have you tried with
and without -XnoInline to affect whether closures are generated or the
around-advice is inlined at the affected location? If you think there is
a problem, please raise a bug and we'll take a look.

cheers,
Andy.
Re: EMMA and AspectJ [message #599025 is a reply to message #72028] Tue, 29 July 2008 19:22 Go to previous message
Andrew Clement is currently offline Andrew Clement
Messages: 162
Registered: July 2009
Senior Member
Hi Uwe,

I should say you will get a faster response on the mailing list rather
than the newsgroup - I only check this once a week or so.

We have had issues with code coverage tools and made changes where
appropriate (generating line number tables for some methods to keep the
tools happy). I'm not aware of any outstanding issues in this area. When
you say:

> When the code coverage tool EMMA is run on AspectJ-advised code, the
reported line coverage for
> methods with around-advices is always 100% (if it was called at all), and
the reported number of lines
> is always 1 (one).

what would you be expecting it to be, for example? Have you tried with
and without -XnoInline to affect whether closures are generated or the
around-advice is inlined at the affected location? If you think there is
a problem, please raise a bug and we'll take a look.

cheers,
Andy.
Previous Topic:EMMA and AspectJ
Next Topic:ClassGenException after upgrade to 1.6.1
Goto Forum:
  


Current Time: Sat Jul 26 15:17:55 EDT 2014

Powered by FUDForum. Page generated in 0.01468 seconds