Skip to content

withincode doesn't work as specified #343

@jafarre-bi

Description

@jafarre-bi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions