Add non-null filter when fetching groups.
Closes #32321 Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
This commit is contained in:
parent
1c347ccf9d
commit
98dc21e6fc
1 changed files with 1 additions and 1 deletions
|
@ -594,7 +594,7 @@ public class JpaRealmProvider implements RealmProvider, ClientProvider, ClientSc
|
|||
|
||||
@Override
|
||||
public Stream<GroupModel> getGroupsStream(RealmModel realm, Stream<String> ids) {
|
||||
return ids.map(id -> session.groups().getGroupById(realm, id)).sorted(GroupModel.COMPARE_BY_NAME);
|
||||
return ids.map(id -> session.groups().getGroupById(realm, id)).filter(Objects::nonNull).sorted(GroupModel.COMPARE_BY_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue