SpringSource/spring-framework — pull request #173 by ttddyy (2012-10-25 04:46:38+00:00)
Title: refactor ContextLoaderUtils class

In ContextLoaderUtils class, these two methods contain similar loop logic
- resolveContextConfigurationAttributes(Class clazz)
- getConfigurationAttributes(Class baseSearchClass)

Created a private method that returns a list of ContextConfigurationAttribute, and changed above two methods to use the new one to clean up the duplicated logic.

**Further cleanup suggestion:**

"resolveContextConfigurationAttributes(Class clazz)" method returns "List< ContextConfigurationAttributes>", and the returned list has parent-class-first order.
On the other hand, the caller of the method, "buildMergedContextConfiguration(...)", uses the list in reverse order: child class first.
So, it would be easier to read if "resolveContextConfigurationAttributes" method returns the list as child-first order.
This method has unit tests in ContextLoaderUtilsTests, so they need to be updated as well.

---
Issue: SPR-9918

I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.