Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quality Gate back to Green #1074

Merged
merged 1 commit into from
Dec 27, 2023
Merged

Quality Gate back to Green #1074

merged 1 commit into from
Dec 27, 2023

Conversation

YassinHajaj
Copy link
Contributor

@YassinHajaj YassinHajaj commented Dec 26, 2023

I fixed the quality gate by adding the missing @SuppressWarnings("squid:S4973").

Although I'm not sure why Objects#equals is not used here instead of ==.

In EnvConfigSource, I'm also not sure why String#length == 0 is used instead of String#isEmpty

@radcortez
Copy link
Member

Thank you for the PR :)

Although I'm not sure why Objects#equals is not used here instead of ==.

We want to avoid using Objects#equals, because it will use String#equals method, which does not really suit how we want to match the property names here, and it is just a waste of operations. Also, because property names tend to have a prefixed name, it is more efficient to match the name's backwords.

In EnvConfigSource, I'm also not sure why String#length == 0 is used instead of String#isEmpty

Yes, it could use isEmpty. Feel free to send a PR for that. Thanks.

@radcortez radcortez merged commit 7cff829 into smallrye:main Dec 27, 2023
8 checks passed
@github-actions github-actions bot added this to the 3.5.1 milestone Dec 27, 2023
@YassinHajaj
Copy link
Contributor Author

Hi @radcortez ,

Thanks for the feedback. I understand a bit better the usage of ==. Makes total sense.

I have written a PR for the isEmpty situation : #1079

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.

None yet

2 participants