[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ews.eclipse.technology.aspectj] Re: Can AspectJ identify synthetic fields?

Adrian Colyer wrote:
Lefty A. Rivera wrote:

I'm using a:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM Windows 32 build cn142-20050609 JIT enabled: jitc)).


Let me add the synthetic fields were added by EMMA instrumentation, does this make any difference?.

How can I tell AspectJ to ignore a line like this  :
boolean aflag[] = ($VRc != null ? $VRc : $VRi())[0];


If not I'll open a Bugzilla bug. :-(.


I had a feeling it might be an IBM 1.4.2 - we've had some "known issues" with that VM in the past where the debug information output by the AspectJ compiler upsets the VM and causes it to crash. If you're compiling with AspectJ 1.2.1 or earlier, and passing the compiler option -g:none makes the problem go away, then odds are very high that this is what you are running into.

AspectJ will only weave into types that have matching join points - if there are no pointcuts matching any join points in the line you quote (or if this is a local variable, any join points inside the declaring method), then the bytecode should pass through unchanged.

As long as EMMA is producing valid .class files there should be no problems passing these into AspectJ - but it is possible that EMMA generates valid though seldom seen patterns that may be triggering an aspectj bug. Without looking at the .class files, it is hard to be more definite than that.

Regards, Adrian.

I just attached the .class file.
I just notice that my aspect has a matching join point, I see what looks to be a synthetic method and my pointcut has the following:
within(Bean) && call(* *.*(..))..,
this should cause the synthetic method to be woven?.

Attachment: Bean.class
Description: Binary data