mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 05:49:04 +00:00
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>