Skip to content
Snippets Groups Projects
Commit 9766ce5e authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-6344 Use expected pipe behavior

parent 9e526b95
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,6 @@ public class DFoerdermittelEngineBasedSemantikAdapter implements EngineBasedSema
FormData processFachnachricht(FormData formData) {
return pipe(
formData,
Stream.of(
this::addFormName,
this::addFormEngineName,
......@@ -64,11 +63,11 @@ public class DFoerdermittelEngineBasedSemantikAdapter implements EngineBasedSema
this::addOrganisationsEinheitId,
this::addFormId
)
);
).apply(formData);
}
private FormData pipe(FormData formData, Stream<UnaryOperator<FormData>> functions) {
return functions
private UnaryOperator<FormData> pipe(Stream<UnaryOperator<FormData>> functions) {
return (formData) -> functions
.reduce(formData, (acc, f) -> f.apply(acc), (a, b) -> a);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment