Skip to content

JaversAuditableRepositoryAspect does not properly handle thrown exceptions #355

Description

@Drizzt321

Javers Spring support uses JaversAuditableRepositoryAspect on Spring-Data @Repository classes for @JaversAuditable or the Spring-Data CrudRepository interface. If an exception is thrown from one of those methods, then JaversAuditableRepositoryAspect, which uses @After will still execute and try and perform a versioning. According to Spring AOP Docs, @After will always execute, regardless of if there was an exception thrown or not. @AfterReturning instead executes only if the method returns normally.

Here's the original StackOverflow question for reference.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions