Skip to content

Commit

Permalink
fix: Sonar cloud issues (#1453)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfespa17 authored Oct 23, 2024
1 parent 9443124 commit e30c986
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public StorageTypeService terraformOutput(StreamingService streamingService, Sto
break;
case AWS:
S3Client s3client;
if (awsStorageTypeProperties.getEndpoint() != "") {
if (awsStorageTypeProperties.getEndpoint() != null && !awsStorageTypeProperties.getEndpoint().isEmpty()) {
log.info("Creating AWS SDK with custom endpoint and custom credentials");
s3client = S3Client.builder()
.region(Region.AWS_GLOBAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public TerraformOutput terraformOutput(TerraformOutputProperties terraformOutput
break;
case AwsTerraformOutputImpl:
S3Client s3client = null;
if (awsTerraformOutputProperties.getEndpoint() != "") {
if (awsTerraformOutputProperties.getEndpoint() != null && !awsTerraformOutputProperties.getEndpoint().isEmpty()) {
log.info("Creating AWS SDK with custom endpoint and custom credentials");
s3client = S3Client.builder()
.region(Region.AWS_GLOBAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public TerraformState terraformState(TerrakubeClient terrakubeClient, TerraformS
case AwsTerraformStateImpl:
S3Client s3client = null;

if (awsTerraformStateProperties.getEndpoint() != "") {
if (awsTerraformStateProperties.getEndpoint() != null && !awsTerraformStateProperties.getEndpoint().isEmpty()) {
log.info("Creating AWS with custom endpoint and custom credentials");
s3client = S3Client.builder()
.credentialsProvider(StaticCredentialsProvider.create(getAwsBasicCredentials(awsTerraformStateProperties)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public StorageService terraformOutput(OpenRegistryProperties openRegistryPropert
break;
case AwsStorageImpl:
S3Client s3client;
if (awsStorageServiceProperties.getEndpoint() != "") {
if (awsStorageServiceProperties.getEndpoint() != null && !awsStorageServiceProperties.getEndpoint().isEmpty()) {
log.info("Creating AWS SDK with custom endpoint and custom credentials");
s3client = S3Client.builder()
.region(Region.AWS_GLOBAL)
Expand Down

0 comments on commit e30c986

Please sign in to comment.