[SPR-7960] No longer tracking empty activated profiles.

This commit is contained in:
Sam Brannen
2011-05-31 22:29:14 +00:00
parent c7473f9124
commit 6981ee566c
2 changed files with 28 additions and 0 deletions

View File

@@ -254,6 +254,12 @@ abstract class ContextLoaderUtils {
}
if (!ObjectUtils.isEmpty(profiles)) {
// Preserve the order in which the profiles were declared by
// reversing the array. This is necessary since we prepend each
// non-empty element to the aggregated list as we traverse the
// class hierarchy. Note that the following works because
// Arrays.asList() "writes through" to the underlying array.
Collections.reverse(Arrays.<String> asList(profiles));
for (String profile : profiles) {