Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] can not build thisJoinPoint lazily for this advice since it has no suitable guard

Hi,

In this code of AspectJ [1], when I try to compile the code I get the following error related to thisJoinPoint. What is the purpose of this error? What should I do to correct this?

[1] Example of aspects

aspect Foo {
  before(): execution(* map(..)) {
     System.out.println(thisJoinPoint);
  }
  before(): execution(* reduce(..)) {
     System.out.println(thisJoinPoint);
  }
  before(): execution(* cleanup(..)) {
     System.out.println(thisJoinPoint);
  }

}

[2] Compilation error

[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.7:compile (default) on project medusa-java: AJC compiler errors:
[ERROR] error at before(): execution(* cleanup(..)) {
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] /home/xeon/repositories/git/medusa-java/src/main/java/org/apache/hadoop/mapred/aspects/MapReduceCalls.aj:27:0::0 can not build thisJoinPoint lazily for this advice since it has no suitable guard [Xlint:noGuardForLazyTjp]

Cheers,


Back to the top