From 1b05029b0fa67e2174af7610b18371a0b6eb6972 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 8eacc14e7..f6bd5db9d 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 @@ -2569,7 +2569,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)));