From f2536e1c41cc07c13ce58384db826a4a51fdb4f9 Mon Sep 17 00:00:00 2001 From: Jaykumar Gosar Date: Wed, 11 Oct 2023 18:19:33 -0700 Subject: [PATCH] Remove async related dead code path from SigningStage --- .../internal/http/pipeline/stages/SigningStage.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/SigningStage.java b/core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/SigningStage.java index 9a99af93e7da..2399c39cab58 100644 --- a/core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/SigningStage.java +++ b/core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/SigningStage.java @@ -20,7 +20,6 @@ import java.util.concurrent.CompletableFuture; import software.amazon.awssdk.annotations.SdkInternalApi; import software.amazon.awssdk.core.SelectedAuthScheme; -import software.amazon.awssdk.core.async.AsyncRequestBody; import software.amazon.awssdk.core.http.ExecutionContext; import software.amazon.awssdk.core.interceptor.ExecutionAttributes; import software.amazon.awssdk.core.interceptor.SdkExecutionAttribute; @@ -31,7 +30,6 @@ import software.amazon.awssdk.core.internal.http.pipeline.RequestToRequestPipeline; import software.amazon.awssdk.core.internal.util.MetricUtils; import software.amazon.awssdk.core.metrics.CoreMetric; -import software.amazon.awssdk.core.signer.AsyncRequestBodySigner; import software.amazon.awssdk.core.signer.Signer; import software.amazon.awssdk.http.SdkHttpFullRequest; import software.amazon.awssdk.http.SdkHttpRequest; @@ -147,18 +145,8 @@ private SdkHttpFullRequest signRequest(SdkHttpFullRequest request, RequestExecut SdkHttpFullRequest signedRequest = measuredSign.left(); - // TODO: This case does not apply to SigningStage as event stream operations are not supported by SyncClients that - // use this SigningStage. So this is dead code and can be removed. - if (signer instanceof AsyncRequestBodySigner) { - //Transform request body provider with signing operator - AsyncRequestBody transformedRequestProvider = - ((AsyncRequestBodySigner) signer) - .signAsyncRequestBody(signedRequest, context.requestProvider(), context.executionAttributes()); - context.requestProvider(transformedRequestProvider); - } updateHttpRequestInInterceptorContext(signedRequest, context.executionContext()); return signedRequest; - }