Community
Participate
Working Groups
consider the following example aspect: package test; public aspect Locals { static void a() { } pointcut callOfA() : call(void test.Locals.a()); after() : callOfA() { System.out.println("a() called at "+thisJoinPoint.getSourceLocation()); } public static void main(String[] argv) { final class Local implements Runnable { public void run() { a(); // <-- warning here } } Local local = new Local(); local.run(); Runnable inner = new Runnable() { public void run() { a(); // <-- and here } }; inner.run(); Nested nested = new Nested(); nested.run(); } private static class Nested implements Runnable { public void run() { a(); } } } On the lines marked in the source AJDT compiler reports a warning: "the shadow for this join point is not exposed in the strucuture model: method-call(void test.Locals.a()) [Xlint:shadowNotInStructure]" and "advised" gutter annotations are not displayed. running the program though displays: a() called at Locals.aj:12 a() called at Locals.aj:19 a() called at Locals.aj:29 which means that advice was woven as I would expect it.
Moving over to AspectJ
Hi Helen, Andy says.... please could you take a look at this one? Thks, A.
I believe this bug has already been fixed. Using the given testcase in AJDT version 20050714091025 (which is close to when this bug was raised) I see exactly the behaviour which was reported. However, trying with a later AJDT 20051019121930 which contains AspectJ 1.5.0.200510141300 I am no longer able to recreate the problem. This is still unrecreatable with the latest AJDT 20051118122350 which contains AspectJ 1.5.0 M5. Possibly, this was fixed as part of bug 77269. Rafal - are you still seeing the problem?
I just tried the 1.3.0.20051121122226 build on Eclipse 3.1.1 and I get the correct behaviour - no warnings, and gutter annotations show up as expected. I consider it fixed :-)
Rafal - thanks for retrying this and also for the comprehensive testcase :-)
Resolving as fixed (see comment #3 and comment #4)