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

Simplify hasText and containsElement methods for better clarity #33572

Closed
wants to merge 3 commits into from

Conversation

dukbong
Copy link
Contributor

@dukbong dukbong commented Sep 20, 2024

  • In the containsElement method, I replaced the null check with the isEmpty method to enhance readability.
  • In the hasText method, I substituted the length check with isEmpty to reduce code duplication.

array == null  -> isEmpty()
str == null & str.length == 0 > isEmpty()
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 20, 2024
steLen -> str.length
@sbrannen sbrannen added status: declined A suggestion or change that we don't feel we should currently apply in: core Issues in core modules (aop, beans, core, context, expression) labels Sep 20, 2024
@sbrannen sbrannen self-assigned this Sep 20, 2024
@sbrannen sbrannen removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 20, 2024
@sbrannen
Copy link
Member

Hi @dukbong,

Thanks for the proposal; however, we are happy with the current implementation of these internal utility methods.

In light of that, I am closing this PR.

Regards,

Sam

@sbrannen sbrannen closed this Sep 20, 2024
@dukbong dukbong deleted the utils branch September 20, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) 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