Skip to content

Aspect executed twice - @AfterThrowing #33704

Closed
@aviv-amdocs

Description

@aviv-amdocs

Affects: 6.1.7-6.1.13


This might be a special case of #32970, except it's not fixed yet. We have both aspectj-maven-plugin and @Aspect.

Demo code (short):

  • double-aspect.tar.gz
  • mvn test will run a failing test.
  • mvn test -Dspring-framework.version=6.1.6 will pass the test.

We have this pattern where we use an Aspect interceptor to replace exceptions thrown by some library with application-specific exceptions.
This worked fine until Spring Framework 6.1.7, and since then, the interceptor is triggered (weaved?) twice. The interceptor doesn't expect the exception it's provided, so it throws an exception nobody expects (In the demo, it just wraps the exception with a new one, and the test checks for getCause().getMessage()).

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions