[SPR-7960] Trimming profiles for good measure.

This commit is contained in:
Sam Brannen 2011-06-01 15:04:34 +00:00
parent 24a97805ef
commit ff2a603f2f
2 changed files with 2 additions and 2 deletions

View File

@ -270,7 +270,7 @@ abstract class ContextLoaderUtils {
for (String profile : profiles) { for (String profile : profiles) {
if (StringUtils.hasText(profile)) { if (StringUtils.hasText(profile)) {
activeProfiles.add(profile); activeProfiles.add(profile.trim());
} }
} }

View File

@ -116,7 +116,7 @@ public class ContextLoaderUtilsTests {
private static class EmptyProfiles { private static class EmptyProfiles {
} }
@ActiveProfiles({ "foo", "bar", "foo", "bar", "baz" }) @ActiveProfiles({ "foo", "bar", " foo", "bar ", "baz" })
private static class DuplicatedProfiles { private static class DuplicatedProfiles {
} }