Bug 182381 - Failures when using eclEmma
Summary: Failures when using eclEmma
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.4   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-13 14:51 EDT by Barry Kaplan CLA
Modified: 2008-06-12 18:32 EDT (History)
2 users (show)

See Also:


Attachments
class and other files (8.55 KB, application/x-zip)
2007-04-13 14:52 EDT, Barry Kaplan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Kaplan CLA 2007-04-13 14:51:03 EDT
Build ID: M20070212-1330

Steps To Reproduce:
Run an eclemma on code that is instrumented with aspectj. In my particular case, aspectj is introduced via Spring's AbstractAspectjJpaTests. 




More information:
Attached is the source file, the class file after being instrumented by eclemma, the ajccore file, and the snippet of the console log.

This particular class does not contain any pointcuts matched by any aspects (eg, the aspectj for spring's @Transactional). It appears as if aspectj is failing simply reading the bytecode. As far as I can tell, aspectj is failing on /every/ class that is instrumnted by eclemma. No classes excluded from eclemma instrumentation generate aspectj errors.
Comment 1 Barry Kaplan CLA 2007-04-13 14:52:40 EDT
Created attachment 63791 [details]
class and other files
Comment 2 Matt Chapman CLA 2007-04-16 04:39:35 EDT
Passing over to AspectJ
Comment 3 Simone Gianni CLA 2008-04-16 06:05:50 EDT
I'm running JUnit tests, from inside eclipse, with EclEmma, and looking at coverage reports correctly.

I'm not using Spring classes, my aspects are woven directly by AJDT.

Comment 4 Andrew Clement CLA 2008-06-12 18:32:49 EDT
After opening the attached core, I see this exception trace:

java.lang.NullPointerException
	at org.aspectj.apache.bcel.generic.MethodGen.<init>(MethodGen.java:305)
	at org.aspectj.weaver.bcel.LazyMethodGen.initialize(LazyMethodGen.java:295)
	at org.aspectj.weaver.bcel.LazyMethodGen.getReturnType(LazyMethodGen.java:891)
	at org.aspectj.weaver.bcel.BcelClassWeaver.calculateAnyRequiredBridgeMethods(BcelClassWeaver.java:707)
	at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1615)

which was addressed by bug 175806

That bug deals with AspectJ encountering code that has been modified and now has incorrect line number table entries, which sounds like what is happening here.  The fix for 175806 was in AspectJ1.5.4 and this bug was raised against 1.5.3 - so presuming this is now fixed.