diff --git a/server/bennu-core/src/main/java/org/fenixedu/bennu/core/groups/IntersectionGroup.java b/server/bennu-core/src/main/java/org/fenixedu/bennu/core/groups/IntersectionGroup.java index 4bc4a1572..a730c62eb 100644 --- a/server/bennu-core/src/main/java/org/fenixedu/bennu/core/groups/IntersectionGroup.java +++ b/server/bennu-core/src/main/java/org/fenixedu/bennu/core/groups/IntersectionGroup.java @@ -54,7 +54,7 @@ public static Group of(Group... groups) { } public static Group of(Stream groups) { - return groups.reduce(NobodyGroup.get(), (result, group) -> result.and(group)); + return groups.reduce((result, group) -> result.and(group)).orElseGet(NobodyGroup::get); } @Override