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

Use CollectionUtils.isEmpty() and StringUtils.hasLength() #40645

Closed
wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented May 9, 2024

search (\w+) != null && !(\1).isEmpty\(\)

…h()`

search `(\w+) != null && !(\1).isEmpty\(\)`
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 9, 2024
@philwebb philwebb changed the title Insist on using CollectionUtils.isEmpty() and StringUtils.hasLength() Use CollectionUtils.isEmpty() and StringUtils.hasLength() May 9, 2024
@mhalbritter
Copy link
Contributor

Hey @quaff, thanks for the PR. If I use this regex to search our main codebase, I still find some which haven't been replaced, like org.springframework.boot.actuate.autoconfigure.health.HealthProperties.Status#setOrder or org.springframework.boot.autoconfigure.condition.ConditionMessage.ItemsBuilder#items(org.springframework.boot.autoconfigure.condition.ConditionMessage.Style, java.util.Collection<?>). Is there a particular reason that those haven't been replaced?

@mhalbritter mhalbritter added the status: waiting-for-feedback We need additional information before we can continue label May 13, 2024
@quaff
Copy link
Contributor Author

quaff commented May 13, 2024

Hey @quaff, thanks for the PR. If I use this regex to search our main codebase, I still find some which haven't been replaced, like org.springframework.boot.actuate.autoconfigure.health.HealthProperties.Status#setOrder or org.springframework.boot.autoconfigure.condition.ConditionMessage.ItemsBuilder#items(org.springframework.boot.autoconfigure.condition.ConditionMessage.Style, java.util.Collection<?>). Is there a particular reason that those haven't been replaced?

They are included in this PR, please check.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels May 13, 2024
@mhalbritter
Copy link
Contributor

Hey @quaff, of course you're right, that was a mistake on my part :)

@mhalbritter mhalbritter added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels May 13, 2024
@mhalbritter mhalbritter added this to the 3.1.x milestone May 13, 2024
@mhalbritter mhalbritter self-assigned this May 13, 2024
@mhalbritter
Copy link
Contributor

Thanks!

@mhalbritter mhalbritter modified the milestones: 3.1.x, 3.1.12 May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants