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

Refactor Locale logic and use Optional for null checks #33653

Closed
wants to merge 2 commits into from

Conversation

SungbinYang
Copy link
Contributor

  • Extracted repeated Locale resolution logic into a private method to reduce duplication.
  • Replaced traditional null checks with Optional to improve readability and make null handling more explicit.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 5, 2024
@sdeleuze sdeleuze self-assigned this Oct 7, 2024
@sdeleuze sdeleuze added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Oct 7, 2024
@sdeleuze
Copy link
Contributor

sdeleuze commented Oct 7, 2024

If think we are prefer to keep the current null check logic as it is rather than paying the cost of wrapping/unwrapping with Optional, the logic in the extracted method is very simple and we tend to prefer to handle this kind of polish within the team, so I decline this PR.

@sdeleuze sdeleuze 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 Oct 7, 2024
@sdeleuze sdeleuze closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) 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