mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-13 05:43:29 +00:00
Converted to use guard clause to reduce nesting.
This commit is contained in:
parent
756be6fed3
commit
28a138f8ec
@ -54,8 +54,11 @@ public class FilterInvocationDefinitionSourceEditor extends PropertyEditorSuppor
|
||||
|
||||
if ((s == null) || "".equals(s)) {
|
||||
// Leave target object empty
|
||||
source.setDecorated(new RegExpBasedFilterInvocationDefinitionMap());
|
||||
} else {
|
||||
setValue(new RegExpBasedFilterInvocationDefinitionMap());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if we need to override the default definition map
|
||||
if (s.lastIndexOf(DIRECTIVE_PATTERN_TYPE_APACHE_ANT) != -1) {
|
||||
source.setDecorated(new PathBasedFilterInvocationDefinitionMap());
|
||||
@ -161,8 +164,7 @@ public class FilterInvocationDefinitionSourceEditor extends PropertyEditorSuppor
|
||||
FilterInvocationDefinitionSourceMapping mapping = new FilterInvocationDefinitionSourceMapping();
|
||||
mapping.setUrl(name);
|
||||
|
||||
String[] tokens = org.springframework.util.StringUtils
|
||||
.commaDelimitedListToStringArray(value);
|
||||
String[] tokens = StringUtils.commaDelimitedListToStringArray(value);
|
||||
|
||||
for (int i = 0; i < tokens.length; i++) {
|
||||
mapping.addConfigAttribute(tokens[i].trim());
|
||||
@ -171,7 +173,7 @@ public class FilterInvocationDefinitionSourceEditor extends PropertyEditorSuppor
|
||||
mappings.add(mapping);
|
||||
}
|
||||
source.setMappings(mappings);
|
||||
}
|
||||
|
||||
|
||||
setValue(source.getDecorated());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user