Skip to content

Commit

Permalink
Improve thread-safety of OnClassCondition
Browse files Browse the repository at this point in the history
Closes gh-41709
  • Loading branch information
wilkinsona committed Oct 29, 2024
1 parent 0aff403 commit b165370
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ public ConditionOutcome[] resolveOutcomes() {
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
if (this.failure != null) {
ReflectionUtils.rethrowRuntimeException(this.failure);
Throwable failure = this.failure;
if (failure != null) {
ReflectionUtils.rethrowRuntimeException(failure);
}
return this.outcomes;
ConditionOutcome[] outcomes = this.outcomes;
return (outcomes != null) ? outcomes : new ConditionOutcome[0];
}

}
Expand Down

0 comments on commit b165370

Please sign in to comment.