Optimize DefaultLifecycleProcessor
by reducing sorting and refactor stopBeans
method.
Do this change due to LifecycleGroup
has been sorted and member in which has same phase, so resort LifecycleGroupMember
list to be meaningless.
If any improvements can do, feel free to tell me.
Comment From: simonbasle
LGTM. I've added some polish to the javadoc since it was making references to Comparable
nature.