diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java index 44eac21f57..152aaeaa2c 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java @@ -251,7 +251,7 @@ public class WorkflowExecuteThread implements Runnable { } private void handleEvents() { - while (this.stateEvents.size() > 0) { + while (!this.stateEvents.isEmpty()) { try { StateEvent stateEvent = this.stateEvents.peek();