mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
b311088f5a
This commit optimizes `DefaultLifecycleProcessor::stopBeans` by using a `TreeMap` when gathering the `LifecycleGroup`s during stopBeans. It also switches to a functional style using `computeIfAbsent`. Finally, it further optimizes `LifecycleGroup` by removing sorting of `LifecycleGroupMember` members list entirely, turning the class into a simple record. This is possible because the members list is already comprised of members which all share the same phase value, so sorting according to each member's phase is redundant. Closes gh-30361 Co-authored-by: Simon Baslé <sbasle@vmware.com>