Skip to content

Commit

Permalink
Also on completeExceptionally
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauernfeind committed Dec 13, 2023
1 parent b284a47 commit 9a0fd32
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,12 @@ public boolean cancel(boolean mayInterruptIfRunning) {
return false;
}

@Override
public boolean completeExceptionally(Throwable ex) {
maybeRelease();
return super.completeExceptionally(ex);
}

@Override
public Table get(final long timeout, @NotNull final TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,12 @@ public boolean cancel(boolean mayInterruptIfRunning) {
return false;
}

@Override
public boolean completeExceptionally(Throwable ex) {
maybeRelease();
return super.completeExceptionally(ex);
}

@Override
public Table get(final long timeout, @NotNull final TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
Expand Down Expand Up @@ -556,6 +562,12 @@ public boolean cancel(boolean mayInterruptIfRunning) {
return false;
}

@Override
public boolean completeExceptionally(Throwable ex) {
maybeRelease();
return super.completeExceptionally(ex);
}

@Override
public Table get(final long timeout, @NotNull final TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
Expand Down

0 comments on commit 9a0fd32

Please sign in to comment.