Community
Participate
Working Groups
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.
Created attachment 63791 [details] class and other files
Passing over to AspectJ
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.
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.