Skip to content

Commit

Permalink
feat(impl):[#214] add logging of warnings to ResultFinder
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmf committed Dec 21, 2023
1 parent a4bb6d3 commit 901c7db
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@
import java.util.Optional;
import java.util.concurrent.CompletableFuture;

import lombok.extern.slf4j.Slf4j;

/**
* Helper class to find the relevant result from a list of futures.
*/
@Slf4j
public class ResultFinder {

/**
Expand All @@ -55,6 +58,9 @@ public <T> CompletableFuture<Optional<T>> getFastestResult(final List<Completabl
resultPromise.complete(Optional.of(value));
return true;
} else {
if (throwable != null) {
log.warn(throwable.getMessage(), throwable);
}
return false;
}
})).toList();
Expand Down

0 comments on commit 901c7db

Please sign in to comment.