Simplify
All checks were successful
/ Verify (pull_request) Successful in 46s

This commit is contained in:
Stefan Bethke 2026-07-21 22:08:11 +02:00
commit 2243397e85

View file

@ -51,16 +51,11 @@ public class AttributeEndpointsResourceProvider implements RealmResourceProvider
AttributeExportContext ctx = new AttributeExportContext(attributeGroupName);
List<String> attribute_list = ctx.users
.map(user -> {
Stream<String> attributeStream = ctx.attributeNames.stream();
attributeStream = attributeStream.map(attributeName -> ctx.MapUserAttribute(user, attributeName).toList())
.flatMap(Collection::stream);
return attributeStream
.filter(attribute -> !attribute.isEmpty())
.toList();
})
.map(user -> ctx.attributeNames.stream()
.map(attributeName -> ctx.MapUserAttribute(user, attributeName).toList())
.flatMap(Collection::stream)
.filter(attribute -> !attribute.isEmpty()).toList()
)
.flatMap(List::stream)
.filter(ctx.filter::matches)
.toList();