spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.77k stars 38.16k forks source link

`@Async` documentation should not suggest deprecated classes #33805

Closed gbaso closed 1 month ago

gbaso commented 1 month ago

@Async javadoc suggests that you can refine the return type of the Future you are returning to ListenableFuture, and provide an AsyncResult as a value holder.

However, both ListenableFuture and AsyncResult are deprecated since 6.0, in favor of CompletableFuture. @Async documentation should reflect this and stop suggesting ListenableFuture as result type.