File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
core/src/main/java/org/springframework/security/core/authority Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change 24
24
25
25
import org .springframework .security .core .GrantedAuthority ;
26
26
import org .springframework .util .StringUtils ;
27
+ import org .springframework .util .Assert ;
27
28
28
29
/**
29
30
* Utility method for manipulating <tt>GrantedAuthority</tt> collections etc.
@@ -55,6 +56,7 @@ public static List<GrantedAuthority> commaSeparatedStringToAuthorityList(
55
56
*/
56
57
public static Set <String > authorityListToSet (
57
58
Collection <? extends GrantedAuthority > userAuthorities ) {
59
+ Assert .notNull (userAuthorities , "userAuthorities cannot be null" );
58
60
Set <String > set = new HashSet <>(userAuthorities .size ());
59
61
60
62
for (GrantedAuthority authority : userAuthorities ) {
You can’t perform that action at this time.
0 commit comments