1
0
mirror of synced 2026-08-04 17:27:13 +00:00

SEC-1342: Introduced extra factory method in SecurityConfig to get round problem with Spring converting a string with commas to an array

This commit is contained in:
Luke Taylor
2009-12-23 14:12:59 +00:00
parent 115d5b84ff
commit bcb1ff8921
3 changed files with 7 additions and 3 deletions
@@ -67,8 +67,12 @@ public class SecurityConfig implements ConfigAttribute {
return createList(StringUtils.commaDelimitedListToStringArray(access));
}
public final static List<ConfigAttribute> createSingleAttributeList(String access) {
return createList(access);
}
public final static List<ConfigAttribute> createList(String... attributeNames) {
Assert.notNull(attributeNames, "You must supply a list of argument names");
Assert.notNull(attributeNames, "You must supply an array of attribute names");
List<ConfigAttribute> attributes = new ArrayList<ConfigAttribute>(attributeNames.length);
for (String attribute : attributeNames) {