From 17e93b6201c887407a8dcb897527006798fa704f Mon Sep 17 00:00:00 2001 From: Lanlan Date: Sun, 28 Apr 2019 12:41:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E6=89=93?= =?UTF-8?q?=E5=8C=85=E5=A4=B1=E8=B4=A5=EF=BC=8Cjob=E6=9C=AA=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/jdbcjobstore/JobStoreSupport.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/fine-quartz/src/com/fr/third/v2/org/quartz/impl/jdbcjobstore/JobStoreSupport.java b/fine-quartz/src/com/fr/third/v2/org/quartz/impl/jdbcjobstore/JobStoreSupport.java index 07efbd4c5..004083236 100644 --- a/fine-quartz/src/com/fr/third/v2/org/quartz/impl/jdbcjobstore/JobStoreSupport.java +++ b/fine-quartz/src/com/fr/third/v2/org/quartz/impl/jdbcjobstore/JobStoreSupport.java @@ -1202,25 +1202,25 @@ public abstract class JobStoreSupport implements JobStore, Constants { if (job == null) { try { job = retrieveJob(conn, newTrigger.getJobKey()); + if (job == null) { + throw new JobPersistenceException("The job (" + + newTrigger.getJobKey() + + ") referenced by the trigger does not exist."); + } + + if (job.isConcurrentExectionDisallowed() && !recovering) { + state = checkBlockedState(conn, job.getKey(), state); + } + + if (existingTrigger) { + getDelegate().updateTrigger(conn, newTrigger, state, job); + } else { + getDelegate().insertTrigger(conn, newTrigger, state, job); + } } catch (JobPersistenceException e) { getLog().error(e.getMessage()); } } - if (job == null) { - throw new JobPersistenceException("The job (" - + newTrigger.getJobKey() - + ") referenced by the trigger does not exist."); - } - - if (job.isConcurrentExectionDisallowed() && !recovering) { - state = checkBlockedState(conn, job.getKey(), state); - } - - if (existingTrigger) { - getDelegate().updateTrigger(conn, newTrigger, state, job); - } else { - getDelegate().insertTrigger(conn, newTrigger, state, job); - } } catch (Exception e) { throw new JobPersistenceException("Couldn't store trigger '" + newTrigger.getKey() + "' for '" + newTrigger.getJobKey() + "' job:" + e.getMessage(), e); @@ -2987,6 +2987,7 @@ public abstract class JobStoreSupport implements JobStore, Constants { } catch (SQLException sqle) { getLog().error("Unable to set trigger state to ERROR.", sqle); } + return null; } if (trigger.getCalendarName() != null) {