Archive for the ‘AspectJ’ Category

AspectJ: Warning advice defined has not been applied [Xlint:adviceDidNotMatch]

Friday, November 13th, 2009

In Eclipse and AJDT, you will see the following warning if an advice has not been applied

advice defined in xxxx has not been applied [Xlint:adviceDidNotMatch]	xxx.class...

To remove this, add the @SuppressAjWarnings({”adviceDidNotMatch”}) on your advice methods

For example:

public aspect MyAspect{
  pointcut ...

  @SuppressAjWarnings({"adviceDidNotMatch"})
  Object around(Transactional transactional) : mylMethodExecution(transactional){
    ...
  }
}

AspectJ: Suppress Warnings adviceDidNotMatch

Tuesday, August 18th, 2009
@SuppressAjWarnings({"adviceDidNotMatch"})

See forum discussion