Skip to content

@Async isn't applied, if the interface doesn't have concrete implementation [SPR-11910] #16529

@spring-projects-issues

Description

@spring-projects-issues

Artem Bilan opened SPR-11910 and commented

If we add @Async fo the interface method, but don't provide an implementation for the interface, we and end up with issue, when @Async can't be applied and java.lang.IllegalArgumentException: Class must not be null is thrown.

Can't we use the same AutoProxyRegistrar technique for @Async as it is for @Transactional?
I mean build a new Proxy independently of target bean state.

I understand that AsyncExecutionAspectSupport should be the first one in the chain, but it looks like we have a limitation on the matter, if we don't provide a real implementation for our annotated interface.

The Spring Integration infrastructure just creates proxy fo the provided interface and that's all.

See linked issue INT-3448


Affects: 4.0.5

Issue Links:

  • INT-3448 Gateway proxy for @Async method throws NullPointerException ("is depended on by")

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions