Community
Participate
Working Groups
Given the following: public aspect A { public static int i = 0; before() : execution(* *.*(..)) {} } public class C { public void m() {} } Changing the value of i to be something else and then saving results in an incremental build and an "adviceDidNotMatch" warning. A full build clears the warning. This is since the JDTLikeHandleProvider (bug 141730) was made the default in AJDT and is down to the call on line 90 of CrosscuttingMembersSet which is the fix for bug 134541). The reason we now hit this is that the JDTLikeHandleProvider doesn't depend on location.
Created attachment 50831 [details] failing testcase Apply this patch to the tests project.
The problem is that the new shadowMunger has the field "hasMatchedAtLeastOnce" set to false, as it would do since it was created on this incremental compile. The shadowmunger it's replacing has "hasMatchedAtLeastOnce" set to true because on the full compile we went through BcelAdvice.implementOn(). Currently in CrosscuttingMembersSet.replaceWith() we do a blanket replace of the shadowmungers to ensure we've picked up the latest changes. I guess we could be more specific here and ensure that we don't loose this type of information......
it's ugly but we could do that ... i've put in similarly ugly fixes before ;)
Created attachment 50839 [details] patch containing proposed fix Apply this patch to the weaver project. This patch contains the fix proposed in the above comment.
test and 'fix' in ;) iplog
fix available in aj dev builds.