Skip to content

Commit 775620c

Browse files
[release/v1.32.x] Null check for nullable response object (#10316)
Co-authored-by: Paurush Garg <[email protected]>
1 parent 96c2914 commit 775620c

File tree

1 file changed

+1
-1
lines changed
  • instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11

1 file changed

+1
-1
lines changed

instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/SqsImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static String getMessageAttribute(Request<?> request, String name) {
137137
}
138138

139139
static String getMessageId(Response<?> response) {
140-
if (response.getAwsResponse() instanceof SendMessageResult) {
140+
if (response != null && response.getAwsResponse() instanceof SendMessageResult) {
141141
return ((SendMessageResult) response.getAwsResponse()).getMessageId();
142142
}
143143
return null;

0 commit comments

Comments
 (0)