Skip to content

Commit 34b80a3

Browse files
SQS: getAttributeValue does not account for attributes potentially being null (#3852)
1 parent a91a186 commit 34b80a3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"services": [
3+
{
4+
"serviceName": "SQS",
5+
"type": "patch",
6+
"changeLogMessages": [
7+
"Fix `GetQueueAttributesResponse` to handle attributes potentially being null (https://github.com/aws/aws-sdk-net/pull/3852)"
8+
]
9+
}
10+
]
11+
}

sdk/src/Services/SQS/Custom/Model/GetQueueAttributesResponse.extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public bool? ContentBasedDeduplication
207207
private string getAttributeValue(string field)
208208
{
209209
string value = null;
210-
this.Attributes.TryGetValue(field, out value);
210+
this.Attributes?.TryGetValue(field, out value);
211211
return value;
212212
}
213213
}

0 commit comments

Comments
 (0)