Migrate ListenableFuture to CompletableFuture

MSAL

Spring Framework 6.0 removed org.springframework.util.concurrent.ListenableFuture in favor of java.util.concurrent.CompletableFuture. This recipe migrates ListenableFuture types, along with their addCallback invocations and ListenableFutureCallback implementations, to CompletableFuture. Files with an addCallback invocation that can't be converted are left unchanged.

org.openrewrite.java.spring.util.concurrent.ListenableToCompletableFuture
mod run . --recipe=org.openrewrite.java.spring.util.concurrent.ListenableToCompletableFuture

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.