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
The following commit(s) were added to refs/heads/master by this push:
new 0416776 revert PR suggestion to schedule task done check
0416776 is described below
commit 0416776580c771471f4744c498a2e2c3caee5ad8
Author: Alex Heneveld <[email protected]>
AuthorDate: Tue Oct 26 14:53:11 2021 +0100
revert PR suggestion to schedule task done check
was correct as was, done is implied by runCount > maxIterations
---
.../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 8de5f11..2c07fa7 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 {