Skip to content

Commit

Permalink
Fixes #491 : Return at most maxCount triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbeck authored and chrisdennis committed Oct 4, 2019
1 parent 77e9826 commit 12e2c06
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2569,7 +2569,7 @@ public List<TriggerKey> selectTriggerToAcquire(Connection conn, long noLaterThan
ps.setBigDecimal(3, new BigDecimal(String.valueOf(noEarlierThan)));
rs = ps.executeQuery();

while (rs.next() && nextTriggers.size() <= maxCount) {
while (rs.next() && nextTriggers.size() < maxCount) {
nextTriggers.add(triggerKey(
rs.getString(COL_TRIGGER_NAME),
rs.getString(COL_TRIGGER_GROUP)));
Expand Down

0 comments on commit 12e2c06

Please sign in to comment.