Skip to content

Commit

Permalink
Avoid unnecessary mapping from stream to list back to stream
Browse files Browse the repository at this point in the history
Signed-off-by: Yannic Klem <Yannic.Klem@bosch.io>
  • Loading branch information
Yannic92 committed May 6, 2022
1 parent 5396893 commit f65957d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,7 @@ private List<ConsumerData> createConsumers(@Nullable final Session session) {
.map(addressWithIndex -> createJmsConsumer(session, failedSources, source,
sourceAddress, addressWithIndex))
.filter(Objects::nonNull)
.toList().stream()
).toList().stream()
)
).toList();

if (!failedSources.isEmpty()) {
Expand Down

0 comments on commit f65957d

Please sign in to comment.