I have been experiencing strange problems since I started using withincode together with execution pointcuts.
Trying to find a minimal reproducer, I found out that the simplest example, which appears in the documentation, is enough to show that something is wrong:
before(): withincode(* *(..)) && execution(* *(..)) {}
The advice is woven into absolutely no method.
If I remove the withincode pointcut, it works as expected:
before(): execution(* *(..)) {}
The advice is woven into every single method.
According to the documentation:
«execution(void m()) && withincode(void m()) is the same as execution(void m())»
Surprisingly enough, withincode(new(..)) && execution(new(..)) seems to work correctly, or I haven't detected any issue.
I'm testing with Aspectj versions 1.9.24 and 1.9.21 and both Eclipse Adoptium 21.0.7.6 and GraalVM community 24.0.1.
I have been experiencing strange problems since I started using
withincodetogether withexecutionpointcuts.Trying to find a minimal reproducer, I found out that the simplest example, which appears in the documentation, is enough to show that something is wrong:
before(): withincode(* *(..)) && execution(* *(..)) {}The advice is woven into absolutely no method.
If I remove the
withincodepointcut, it works as expected:before(): execution(* *(..)) {}The advice is woven into every single method.
According to the documentation:
«
execution(void m()) && withincode(void m())is the same asexecution(void m())»Surprisingly enough,
withincode(new(..)) && execution(new(..))seems to work correctly, or I haven't detected any issue.I'm testing with Aspectj versions 1.9.24 and 1.9.21 and both Eclipse Adoptium 21.0.7.6 and GraalVM community 24.0.1.