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

Removed useless hardcoded Strings in EnvUtils. #4007

Merged
merged 3 commits into from
Sep 29, 2021

Conversation

DiegoKrupitza
Copy link
Contributor

The previous code used a switch statement that did nothing more than
just checking if a given name matches a hardcoded string. The same
functionality can be implemented with a Java native functionality that
is way faster and easier to read.

What's the purpose of this PR

Improve the functionality and readability of an Utility class inside the core package. Additionally I added more test cases to improve coverage and make sure the previous code works as intended.

Which issue(s) this PR fixes:

NONE

Brief changelog

Improvement of the an utility class

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Read the Contributing Guide before making this pull request.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit tests to verify the code.
  • Run mvn clean test to make sure this pull request doesn't break anything.
  • Update the CHANGES log.

The previous code used a switch statement that did nothing more than
just checking if a given name mathces a hardcoded string. The same
functionality can be implemented with a Java native functionality that
is way faster and easier to read.
@github-actions
Copy link

github-actions bot commented Sep 29, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@DiegoKrupitza
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@DiegoKrupitza
Copy link
Contributor Author

recheck

@kezhenxu94 kezhenxu94 added the chore Project chores such as CI settings, typos, etc. label Sep 29, 2021
@kezhenxu94 kezhenxu94 added this to the 1.10.0 milestone Sep 29, 2021
@kezhenxu94 kezhenxu94 merged commit 6e2e4d8 into apolloconfig:master Sep 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chore Project chores such as CI settings, typos, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants