You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2021/10/25 12:28:05 UTC

[brooklyn-server] 14/15: fix bad logic in summary string for scheduled task, per code review

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit 30f9704cdc2df5af4437e69f79168e47e76b7dcf
Author: Alex Heneveld <al...@cloudsoftcorp.com>
AuthorDate: Mon Oct 25 13:25:35 2021 +0100

    fix bad logic in summary string for scheduled task, per code review
---
 .../src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java b/core/src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java
index 2c07fa7..8de5f11 100644
--- a/core/src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java
+++ b/core/src/main/java/org/apache/brooklyn/util/core/task/ScheduledTask.java
@@ -231,7 +231,7 @@ public class ScheduledTask extends BasicTask<Object> {
     
     @Override
     public boolean isDone(boolean andTaskNoLongerRunning) {
-        boolean done = isCancelled() || (maxIterations!=null && maxIterations <= runCount) || (period==null && nextRun!=null && nextRun.isDone());
+        boolean done = isCancelled() || (maxIterations!=null && maxIterations > runCount) || (period==null && nextRun!=null && nextRun.isDone());
         if (andTaskNoLongerRunning) {
             return done && super.isDone(true);
         } else {