Prepare AWS SDK v1 async client calls for v2
Apache 2.0Runs before software.amazon.awssdk.v2migration.AwsSdkJavaV1ToV2. A v1 *Async client also implements the sync interface, so sqsAsync.sendMessage(req) blocked and threw, whereas on the v2 async client the same call returns a CompletableFuture. This renames xxxAsync(req) to the v2 name xxx(req), so that after v2-migration CompleteAwsAsyncClientCalls can tell the two apart: a former blocking call still returns the response type, a former xxxAsync call a Future. An async client used where a sync client is expected is wrapped in a generated AwsSyncClients.blocking(client, SyncClient.class), a blocking view of the same client. Calls that take an AsyncHandler are marked for manual migration.
org. openrewrite. aws. sdk. PrepareAwsAsyncClientCallsOptional
Whether to generate the helper classes that the changes use. Compositions that limit where helpers are generated set it to false and generate them with org.openrewrite.aws.sdk.GenerateAwsSdkV2Helpers. Defaults to true.
mod run . --recipe= org. openrewrite. aws. sdk. PrepareAwsAsyncClientCallsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.