Skip to content

Commit

Permalink
SHIBUI-2063
Browse files Browse the repository at this point in the history
NPE exception on login fix
  • Loading branch information
chasegawa committed Sep 15, 2021
1 parent 01b1412 commit f27a026
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.pac4j.saml.profile.SAML2Profile;

import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

Expand Down Expand Up @@ -41,7 +42,8 @@ public List<String> getGroups() {
}

public Set<String> getRoles() {
return (Set<String>) getAttribute(profileMapping.getRoles());
Set<String> result = (Set<String>) getAttribute(profileMapping.getRoles());
return result == null ? new HashSet<>() : result;
}

@Override
Expand Down
Empty file.
Empty file.

0 comments on commit f27a026

Please sign in to comment.