
|
If you were logged in you would be able to see more operations.
|
|
|
|
|
| Component/s: |
None
|
| Affects Version/s: |
1.6
|
| Fix Version/s: |
None
|
|
|
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.
|
|
Description
|
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. |
Show » |
|