Skip to content

replace Collections.sort() by List.sort() #1325

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

Conversation

hduelme
Copy link
Contributor

@hduelme hduelme commented Jan 26, 2023

Since java 8 List.sort() can be used instead of Collections.sort() to sort an list.
I also refactor getDefaultStrategies to directly return Collections.emptyList(); if the result of defaultStrategies.getProperty(key) is null. This reduces the complexity of the method and prevent the not needed call to sort() for Collections.emptyList().

@gregturn gregturn closed this in 4074c58 Feb 6, 2023
gregturn added a commit that referenced this pull request Feb 6, 2023
Related: #1325.
@gregturn gregturn self-assigned this Feb 6, 2023
@gregturn gregturn added the type: enhancement A general enhancement label Feb 6, 2023
@gregturn gregturn added this to the 4.0.2 milestone Feb 6, 2023
@gregturn
Copy link
Contributor

gregturn commented Feb 6, 2023

Thanks @hduelme!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants