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

improvement: List<MessageSource> already ordered #11559

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Jan 31, 2025

This PR adds a test to verify message source order is taken into account. Moreover, it simplifies the CompositeMessageSource constructor just passing a List of beans of type MessageSource. The list will be already ordered.

@sdelamo sdelamo requested review from dstepanov and yawkat January 31, 2025 10:06
This PR adds a test to verify message source order is taken into account. Moreover, it simplifies the CompositeMessageSource constructor just passing a List of beans of type MessageSource. The list will be already ordered.
@sdelamo sdelamo force-pushed the messages-source-ordering branch from 183e58b to 6af3d01 Compare January 31, 2025 10:06
@sdelamo sdelamo added the type: improvement A minor improvement to an existing feature label Jan 31, 2025
@dstepanov
Copy link
Contributor

A collection is not ordered by a list is?

@sdelamo
Copy link
Contributor Author

sdelamo commented Jan 31, 2025

A collection is not ordered by a list is?

I am unsure if a Collection of beans of a certain type gets injected or ordered. The fact that the previous code ordered the collection explicitly tells me the collection may not have been injected in order.

Nonetheless, I think injecting a List of beans of a certain type is more correct, which clearly conveys that you want an ordered collection.

@sdelamo sdelamo changed the base branch from 4.7.x to 4.8.x February 3, 2025 11:11
@sdelamo sdelamo force-pushed the messages-source-ordering branch from b95b4b2 to 46e02b7 Compare February 5, 2025 12:30
@sdelamo sdelamo merged commit f2f430f into 4.8.x Feb 5, 2025
22 checks passed
@sdelamo sdelamo deleted the messages-source-ordering branch February 5, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants