Skip to content

Commit

Permalink
fix NPE when no roles in groups (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgheymans authored Apr 25, 2020
1 parent a732d50 commit a56c226
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/akhq/utils/UserGroupUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public List<String> getUserRoles(List<String> groups) {

return this.akhqGroups.stream()
.filter(group -> groups.contains(group.getName()))
.filter(group -> group.getRoles() != null)
.flatMap(group -> group.getRoles().stream())
.distinct()
.collect(Collectors.toList());
Expand Down

0 comments on commit a56c226

Please sign in to comment.