From b17024f5ca7cb5af9a5c4c3dcbb05c3e29d77346 Mon Sep 17 00:00:00 2001 From: Brad Beck Date: Thu, 12 Sep 2019 11:08:19 -0500 Subject: [PATCH] Return at most maxCount triggers --- .../main/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz-core/src/main/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java b/quartz-core/src/main/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java index 6917dcf87..12ff32cf1 100644 --- a/quartz-core/src/main/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java +++ b/quartz-core/src/main/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java @@ -2612,7 +2612,7 @@ public List 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)));