fix incorrect precondition check in `SupervisorManager.suspendOrResumeSupervisor` (#6364)

This check is reverse from the intention
This commit is contained in:
Clint Wylie 2018-09-21 17:40:14 -07:00 committed by Jonathan Wei
parent f12ffd19a8
commit 399a5659b2
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ public class SupervisorManager
{ {
Preconditions.checkState(started, "SupervisorManager not started"); Preconditions.checkState(started, "SupervisorManager not started");
Pair<Supervisor, SupervisorSpec> pair = supervisors.get(id); Pair<Supervisor, SupervisorSpec> pair = supervisors.get(id);
Preconditions.checkNotNull(pair.lhs, "spec"); Preconditions.checkNotNull(pair.rhs, "spec");
synchronized (lock) { synchronized (lock) {
Preconditions.checkState(started, "SupervisorManager not started"); Preconditions.checkState(started, "SupervisorManager not started");
SupervisorSpec nextState = suspend ? pair.rhs.createSuspendedSpec() : pair.rhs.createRunningSpec(); SupervisorSpec nextState = suspend ? pair.rhs.createSuspendedSpec() : pair.rhs.createRunningSpec();