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.