Skip to content

ApplicationListenerMethodAdapter inconsistently publishes events from CompletableFuture #30578

@jhoeller

Description

@jhoeller

For values returned from an @EventListener method, ApplicationListenerMethodAdapter detects arrays/collections and publishes every single element as an event. However, for its CompletionStage check (as applied to a CompletableFuture), it always publishes the given Object as-is. It should delegate to the publishEvents methods with its arrays/collections check as well.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions