brite, a MVC Framework for jQuery

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

November 13th, 2009 by jeremychone

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){
    ...
  }
}

2 Responses to “AspectJ: Warning advice defined has not been applied [Xlint:adviceDidNotMatch]”

  1. Erik Says:

    Thanks, was looking for that :)

  2. Marco Says:

    After some time googling found your aswner. Works like a charm. Thanks