Community
Participate
Working Groups
Advice on the following pointcut doesn't reliably match in a project I am working on. get(@Obtain static * *); Frustratingly small changes will "fix" this: moving a matching class from tests to src, cutting out chunks of generics code to shrink the sample, ... Because of how sensitive this bug is I've been unable to produce a standalone example so I've only got a reference to the actual project. The environment I'm using is: * Eclipse 3.2 * ADJT 1.4.1.200609121012 * Subclipse for Subversion access from http://subclipse.tigris.org/update_1.0.x The project in question can be checked out from: http://svn.sourceforge.net/svnroot/dash-framework/dash-obtain/branches/ajdt-bug I've removed most of the jars so that checkout is small. The compiler settings make "advice did not match" an error so the failure in src/dash/obtain/aspects/ObtainStaticAspect.aj should be easy to see. The two test files that should match here are tests/dash/obtain/ObtainStaticTests.java tests/dash/obtain/ObtainStaticTestClass.java Running the "Dash-Obtain-Tests" launcher (even with the compile error) will fail on that test.
Created attachment 50142 [details] cut-down testcase I've managed to reproduce the problem with the attached cut-down project via the following steps: - after a full build, the advice is not matching anything - open ObtainStaticTest.java and uncomment the System.out.println and save - an incremental build occurs and now the advice is matching 3 places (the line uncommented above, plus the 2 places it should have matched in the first place) - do a full build - now the aspect only matches one palce - the uncommented line
Passing over to compiler
thanks for trimming down the testcase Matt - and explaining what to expect between the compile stages. I have committed the testcode and have almost got a fix I am happy with.
Fixes committed.
This is working from Ant/AspectJ now but still not from Eclipse/AJDT. I've updated AJDT to 1.4.1.200609201103 (from http://download.eclipse.org/tools/ajdt/32/dev/update) The "cut-down testcase" doesn't work (and neither does the project this started with) still failing with an advice does not match warning. thanks.
The latest 1.4 and 1.5 AJDT dev builds now contain this fix.
Thanks! Work as of AJDT 1.4.1.200609210900