Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
HybridLocalStrategy: NPE fix while canceling delegating job
Browse files Browse the repository at this point in the history
Summary: ^

Reviewed By: cjhopman

fbshipit-source-id: c5a8f0b81835e80e680ba1cb4b0a8c7b291928f8
  • Loading branch information
mykola-semko authored and facebook-github-bot committed Sep 28, 2021
1 parent ae5b505 commit 239e850
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ public ListenableFuture<?> rescheduleLocally(Throwable reason) {

public boolean cancelDelegateLocked(Throwable reason) {
Verify.verify(Thread.holdsLock(this));
if (delegateResult == null) {
LOG.debug("Nothing to cancel.");
return false;
}

StrategyBuildResult capturedDelegateResult = Objects.requireNonNull(delegateResult);
if (capturedDelegateResult.getBuildResult().isDone()) {
Expand Down

0 comments on commit 239e850

Please sign in to comment.