Skip to content

Commit

Permalink
Fixed FixedThreadPoolBulkhead: A CompletionException should not be wr…
Browse files Browse the repository at this point in the history
…apped inside of another CompletionException.
  • Loading branch information
Robert Winkler committed Feb 4, 2020
1 parent 22931ca commit 476151a
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,9 @@ public <T> CompletableFuture<T> submit(Callable<T> callable) {
try {
publishBulkheadEvent(() -> new BulkheadOnCallPermittedEvent(name));
return callable.call();
} catch (Exception e) {
if(e instanceof CompletionException){
throw (CompletionException)e;
}
} catch (CompletionException e) {
throw e;
} catch (Exception e){
throw new CompletionException(e);
}
}), executorService).whenComplete((result, throwable) -> {
Expand Down

0 comments on commit 476151a

Please sign in to comment.