aws / aws-sdk-java-v2

The official AWS SDK for Java - Version 2
Apache License 2.0
2.12k stars 802 forks source link

Avoid NPE, profileFileSupplier can be null for tests #5314

Closed sugmanue closed 1 week ago

sugmanue commented 1 week ago

Motivation and Context

We have seen random failures for UseGlobalEndpointResolverTest and there's a red herring log when attempting to get from profileFileSupplier which can be null. This change does not fix the bug but removes the misleading warning log by avoiding dereferencing a null object.

Modifications

Testing

Screenshots (if appropriate)

Types of changes

Checklist

License

sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
83.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud