Skip to content

Commit 6ad4a5a

Browse files
committed
Remove the if statement
1 parent 3ecfc0d commit 6ad4a5a

3 files changed

Lines changed: 0 additions & 17 deletions

File tree

generated/src/aws-cpp-sdk-s3-crt/source/S3CrtClient.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -875,11 +875,6 @@ S3CrtClient::CopyObjectPropertiesOutcome S3CrtClient::PopulateCopyObjectProperti
875875
const auto& head = headOutcome.GetResult();
876876
const Aws::String sourceETag = head.GetETag();
877877

878-
// Detect source mutation via ETag conditional without requiring s3:GetObjectVersion.
879-
// If the user explicitly provided sourceVersionId, it is already parsed above and preserved.
880-
if (sourceVersionId.empty() && !head.GetVersionId().empty()) {
881-
sourceVersionId = head.GetVersionId();
882-
}
883878
if (!httpRequest->HasHeader("x-amz-copy-source-if-match") && !sourceETag.empty()) {
884879
httpRequest->SetHeaderValue("x-amz-copy-source-if-match", sourceETag);
885880
}

tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/s3/s3-crt/S3CrtSpecificOperations.vm

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,6 @@ S3CrtClient::CopyObjectPropertiesOutcome S3CrtClient::PopulateCopyObjectProperti
369369
const auto& head = headOutcome.GetResult();
370370
const Aws::String sourceETag = head.GetETag();
371371

372-
// Detect source mutation via ETag conditional without requiring s3:GetObjectVersion.
373-
// If the user explicitly provided sourceVersionId, it is already parsed above and preserved.
374-
if (sourceVersionId.empty() && !head.GetVersionId().empty())
375-
{
376-
sourceVersionId = head.GetVersionId();
377-
}
378372
if (!httpRequest->HasHeader("x-amz-copy-source-if-match") && !sourceETag.empty())
379373
{
380374
httpRequest->SetHeaderValue("x-amz-copy-source-if-match", sourceETag);

tools/code-generation/generator/src/main/resources/com/amazonaws/util/awsclientgenerator/velocity/cpp/s3/s3-crt/SmithyS3CrtSpecificOperations.vm

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,6 @@ S3CrtClient::CopyObjectPropertiesOutcome S3CrtClient::PopulateCopyObjectProperti
369369
const auto& head = headOutcome.GetResult();
370370
const Aws::String sourceETag = head.GetETag();
371371

372-
// Detect source mutation via ETag conditional without requiring s3:GetObjectVersion.
373-
// If the user explicitly provided sourceVersionId, it is already parsed above and preserved.
374-
if (sourceVersionId.empty() && !head.GetVersionId().empty())
375-
{
376-
sourceVersionId = head.GetVersionId();
377-
}
378372
if (!httpRequest->HasHeader("x-amz-copy-source-if-match") && !sourceETag.empty())
379373
{
380374
httpRequest->SetHeaderValue("x-amz-copy-source-if-match", sourceETag);

0 commit comments

Comments
 (0)