Commits

bayard  committed efac62a

Applying second patch from QUARTZ-557

git-svn-id: http://svn.opensymphony.com/svn/quartz/branches/quartz_1-6@72069f7d36a-ea1c-0410-88ea-9fd03e4c9665

  • Participants
  • Parent commits a5792b9
  • Branches quartz_1-6

Comments (0)

Files changed (1)

File src/java/org/quartz/SimpleTrigger.java

     public void updateWithNewCalendar(Calendar calendar, long misfireThreshold)
     {
         nextFireTime = getFireTimeAfter(previousFireTime);
+
+        if (nextFireTime == null || calendar == null) {
+            return;
+        }
         
         Date now = new Date();
-        do {
-            while (nextFireTime != null && calendar != null
-                    && !calendar.isTimeIncluded(nextFireTime.getTime())) {
-                nextFireTime = getFireTimeAfter(nextFireTime);
-            }
+        while (nextFireTime != null && !calendar.isTimeIncluded(nextFireTime.getTime())) {
+
+            nextFireTime = getFireTimeAfter(nextFireTime);
             
             if(nextFireTime != null && nextFireTime.before(now)) {
                 long diff = now.getTime() - nextFireTime.getTime();
                 if(diff >= misfireThreshold) {
                     nextFireTime = getFireTimeAfter(nextFireTime);
-                    continue;
                 }
             }
-        }while(false);
+        }
     }
 
     /**