Skip to content

Conversation

AndreKurait
Copy link
Member

@AndreKurait AndreKurait commented Mar 24, 2025

Description

SonarQube code smells for 2.3 release

Issues Resolved

Testing

See GHA

Check List

  • New functionality includes testing
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Andre Kurait <[email protected]>
S3AsyncClient s3Client = S3AsyncClient.crtBuilder()
.credentialsProvider(DefaultCredentialsProvider.create())
.region(Region.of(s3Region))
.credentialsProvider(DefaultCredentialsProvider.create())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attempt to fix lingering sonarqube issue on this builder by changing the order here to match sonarqube's documentation

Predicate<String> contentTypeFilter) {
// ContentType not text if specified and has a value with / and that value does not start with text/
return Optional.ofNullable(capturedHttpJsonMessage.headers().insensitiveGet(HttpHeaderNames.CONTENT_TYPE.toString()))
return Optional.ofNullable(message.headers().insensitiveGet(HttpHeaderNames.CONTENT_TYPE.toString()))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a behavior change since we were only passing in capturedHttpJsonMessage to this method, but it should use the parameter message nonetheless

@AndreKurait AndreKurait marked this pull request as ready for review March 24, 2025 20:01
@AndreKurait AndreKurait changed the title SonarQube fixes 2.3 release SonarQube Code Smells 2.3 release Mar 24, 2025
@AndreKurait AndreKurait merged commit 8c62e86 into opensearch-project:main Mar 24, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants