Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] [Xlint:adviceDidNotMatch]

I'm working on an aspect that used to work, but I've since changed versions of java from 1.5 to 1.6.
 
Java version is 1.6.0_25, and for AspectJ is the latest as of today( 1.6.12.M1 ).  I had successfully used AspectJ version 1.6.11.  When I was trying to get this all working in the first place, I was using 1.6.10, and was having the same issue as I'm seeing now.
 
I'm getting the warning in the subject line that my advice does not match.  I can't get any advice working that refers to my code. If I do this:
 
public aspect proAuditAspect
{
    pointcut traced() : ! within( proAuditAspect );
 
    before() : traced()
    {
    }
}
 
...I get no warning. But if I do this:
 
import com.myCompany.myClass;
 
public aspect proAuditAspect
{
    pointcut traced() : execution( * myClass.execute() ) &&
        ! within( proAuditAspect );
    before() : traced()
    {
    }
}
 
(the difference is only the bolded part)
 
The class exists in my classpath, but I get the warning and the advice is never called.
 
I'm not sure what anyone on the list can do without my environment, but is there anything I'm missing?  Should I try going back a few versions of AspectJ?  I've tried dropping back to Java 1.5, but same problem.
 
I use the ajc compiler to compile my java classes. and set the target to 1.5. 
 
Thanks for any advice (no pun intended) you can give.
 
Scott
 

Back to the top