Fix bug in TriggerConnector.shouldRun()

This commit is contained in:
Nico Schmitz 2018-10-16 01:33:08 +02:00
parent 2e4f18794f
commit 3f5d795e15

View file

@ -102,11 +102,17 @@ public class TriggerConnector extends Trigger {
@Override
public synchronized boolean shouldRun() {
boolean result = false;
boolean result = true;
for (Trigger t : list) {
result = connectorType.apply(result, t.shouldRun());
// check first trigger
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;
}