History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-679
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: James House
Reporter: Wessel van Norel
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

AnnualCalendar is not usable over time and when you persist it

Created: 14/Jul/08 11:16 AM   Updated: 02/Aug/08 09:26 PM
Component/s: None
Affects Version/s: 1.6
Fix Version/s: None

File Attachments: 1. Text File QUARTZ-679.patch (7 kb)


Flags: Patch


 Description  « Hide
AnnualCalendar uses an optimization by looking at the sorted ArrayList of excluded days to see if a given Calendar object is excluded or not. But when this Arraylist is sorted, the year is taken into account. Which causes problems if you add days to the ExcludedDaysList over a period of some years. Also removing excluded days only works if the calendar object equals function returns true, which means that not only they day and the month should be the same, but also all other fields in the calendar object.

Furthermore, the AnnualCalendarTest class doesn't take into account that Calendar.MONTH is in the range of 0-11 and not 1-12 and that if you change the days in the calendar object, which you stored in the AnnualCalendar, you also change the object in the stored version, so the tests are bogus.

 All   Comments   Change History      Sort Order:
Wessel van Norel - [14/Jul/08 11:17 AM ]
Added a patch with a fix for the reported bug and some more test cases to show the incorrect behavior of the AnnualCalendar.

James House - [02/Aug/08 09:26 PM ]
applied patch. Thanks!