Skip to content

Commit

Permalink
fix(pinpoint): Add null check to prevent NPE (#3274)
Browse files Browse the repository at this point in the history
Co-authored-by: Divyesh Chitroda <[email protected]>
  • Loading branch information
sdhuka and div5yesh authored May 3, 2023
1 parent c3c66f2 commit 3b55353
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,11 @@ private boolean isClientExceptionRetryable(Throwable amazonClientException) {
if (!isNetworkAvailable(pinpointContext.getApplicationContext())) {
return true;
}
return amazonClientException.getCause() != null &&
(amazonClientException.getCause() instanceof UnknownHostException ||
amazonClientException.getCause() instanceof SocketException);
return amazonClientException != null &&
amazonClientException.getCause() != null &&
( amazonClientException.getCause() instanceof UnknownHostException ||
amazonClientException.getCause() instanceof SocketException
);
}

/**
Expand Down

0 comments on commit 3b55353

Please sign in to comment.