Skip to content

Commit

Permalink
BEP refactor ver2 (helidon-io#3232)
Browse files Browse the repository at this point in the history
* Re-introduce BEP refactor reverted in helidon-io#3130
* Fix helidon-io#3129

Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
  • Loading branch information
danielkec authored Jul 29, 2021
1 parent eb1bf77 commit 15c5ea8
Show file tree
Hide file tree
Showing 6 changed files with 364 additions and 216 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,17 @@ static <T, S> BiConsumer<T, S> combine(
return ((BiConsumerChain<T, S>) current).combineWith(another);
}
BiConsumerChain<T, S> newChain = new BiConsumerChain<>();
newChain.add(current);
newChain.add(another);
if (current instanceof BiConsumerChain) {
newChain.addAll((BiConsumerChain<T, S>) current);
} else {
newChain.add(current);
}

if (another instanceof BiConsumerChain) {
newChain.addAll((BiConsumerChain<T, S>) another);
} else {
newChain.add(another);
}
return newChain;
}
}
Loading

0 comments on commit 15c5ea8

Please sign in to comment.