SonarLint: Refactor the code so this stream pipeline is used.
Inspection info:
Intermediate Stream methods should not be left unused
java:S3958
list
.getFields()
.values()
.stream()
.map(f -> api
.get(f.getId())
.thenApply(attr -> attr.map(a -> a.name))
)
.reduce(
CompletableFuture.completedFuture(new ArrayList<>()),
(a, b) -> null,
(a, b) -> null
);