Skip to content

Commit

Permalink
Remove async related dead code path from SigningStage
Browse files Browse the repository at this point in the history
  • Loading branch information
gosar committed Oct 12, 2023
1 parent 3358817 commit 2d8fd46
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;

}


Expand Down

0 comments on commit 2d8fd46

Please sign in to comment.