Skip to content

Refactor getHeaders() method to use early return #33997

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

Closed
wants to merge 1 commit into from

Conversation

khyojun
Copy link
Contributor

@khyojun khyojun commented Dec 1, 2024

Changes & Considerations

  • In this case, the if-else if structure was used for the conditions, but since there aren’t too many scattered branches, I thought it might be better to refactor the code for readability using an early return approach. So, I’ve proposed the following changes!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 1, 2024
@bclozel
Copy link
Member

bclozel commented Dec 2, 2024

I don't think this PR is improving things.

@bclozel bclozel closed this Dec 2, 2024
@bclozel bclozel added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants