Skip to content

Commit 8ce6c73

Browse files
committed
Add check for empty attributes list as well as null, in DelegatingMethodSecurityMetadataSource
1 parent d6b7b52 commit 8ce6c73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/springframework/security/access/method/DelegatingMethodSecurityMetadataSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public Collection<ConfigAttribute> getAttributes(Method method, Class<?> targetC
5353
Collection<ConfigAttribute> attributes = null;
5454
for (MethodSecurityMetadataSource s : methodSecurityMetadataSources) {
5555
attributes = s.getAttributes(method, targetClass);
56-
if (attributes != null) {
56+
if (attributes != null && !attributes.isEmpty()) {
5757
break;
5858
}
5959
}

0 commit comments

Comments
 (0)