Skip to content

Commit b3a738e

Browse files
JeffAshtonboblodgett
authored andcommitted
Enabling the CA2007 reliability warning: Do not directly await a Task
1 parent 1d005db commit b3a738e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

sdk/AWSDotNetSDK.ruleset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<Rule Id="CA1819" Action="Error" />
7171
<Rule Id="CA1822" Action="Error" />
7272
<Rule Id="CA1823" Action="None" />
73-
<Rule Id="CA2007" Action="None" />
73+
<Rule Id="CA2007" Action="Error" />
7474
<Rule Id="CA2119" Action="Error" />
7575
<Rule Id="CA2211" Action="Error" />
7676
<Rule Id="CA2214" Action="Error" />

sdk/AWSDotNetSDKForBuild.ruleset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<Rule Id="CA1819" Action="Error" />
7171
<Rule Id="CA1822" Action="Error" />
7272
<Rule Id="CA1823" Action="None" />
73-
<Rule Id="CA2007" Action="None" />
73+
<Rule Id="CA2007" Action="Error" />
7474
<Rule Id="CA2119" Action="Error" />
7575
<Rule Id="CA2211" Action="Error" />
7676
<Rule Id="CA2214" Action="Error" />

sdk/src/Services/S3/Custom/Util/_async/BucketRegionDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static partial class BucketRegionDetector
4545
internal static async Task<string> DetectMismatchWithHeadBucketFallbackAsync(AmazonS3Uri requestedBucketUri, AmazonServiceException serviceException, ImmutableCredentials credentials)
4646
{
4747
return GetCorrectRegion(requestedBucketUri, serviceException) ??
48-
CheckRegionAndUpdateCache(requestedBucketUri, await GetBucketRegionNoPipelineAsync(requestedBucketUri.Bucket, credentials));
48+
CheckRegionAndUpdateCache(requestedBucketUri, await GetBucketRegionNoPipelineAsync(requestedBucketUri.Bucket, credentials).ConfigureAwait(false));
4949
}
5050

5151
/// <summary>

sdk/src/Services/WorkDocs/Custom/_async/ContentManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public async Task<UploadDocumentStreamResponse> UploadDocumentStreamAsync(Upload
120120
content.RemoveHttpContentHeader("Content-Type");
121121
content.AddHttpContentHeader("Content-Type", uploadDocumentStreamRequest.ContentType);
122122

123-
await httpClient.PutRequestUriAsync(uploadUrl, content, requestHeaders);
123+
await httpClient.PutRequestUriAsync(uploadUrl, content, requestHeaders).ConfigureAwait(false);
124124
var task = CompleteUpload(documentId, versionId);
125125

126126
UploadDocumentStreamResponse uploadDocumentStreamResponse = new UploadDocumentStreamResponse(uploadDocumentStreamRequest)

0 commit comments

Comments
 (0)