Skip to content

Commit

Permalink
Merge pull request apache#4793 from mbien/cancel-noop
Browse files Browse the repository at this point in the history
NBABasedBulkSearch::encode doesn't return on cancel
  • Loading branch information
mbien authored Nov 8, 2022
2 parents b8900c1 + bbf45b3 commit 819c07a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,9 @@ public void encode(Tree tree, final EncodingContext ctx, AtomicBoolean cancel) {
throw new IllegalStateException(ex);
}
}
if (cancel.get());
if (cancel.get()) {
return;
}
new CollectIdentifiers<Void, Void>(new HashSet<>(), cancel) {
private boolean encode = true;
@Override
Expand Down Expand Up @@ -511,7 +513,6 @@ public Void scan(Iterable<? extends Tree> nodes, Void p) {

ctx.setIdentifiers(identifiers);
ctx.setContent(content);
if (cancel.get());
}

@Override
Expand Down

0 comments on commit 819c07a

Please sign in to comment.