Fix bug in TriggerConnector.shouldRun()
This commit is contained in:
parent
2e4f18794f
commit
3f5d795e15
1 changed files with 9 additions and 3 deletions
|
@ -102,11 +102,17 @@ public class TriggerConnector extends Trigger {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized boolean shouldRun() {
|
public synchronized boolean shouldRun() {
|
||||||
boolean result = false;
|
boolean result = true;
|
||||||
|
|
||||||
for (Trigger t : list) {
|
// check first trigger
|
||||||
result = connectorType.apply(result, t.shouldRun());
|
if (list.size() > 0)
|
||||||
|
result = list.get(0).shouldRun();
|
||||||
|
|
||||||
|
// check all others
|
||||||
|
for (int i = 1; i < list.size(); ++i) {
|
||||||
|
result = connectorType.apply(result, list.get(i).shouldRun());
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue