Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
JCR Resource 2.7.4
-
None
Description
The AssertCalendar class in the test code compares Calendar objects like this:
assertEquals(expected.getTime(), actual.getTime()); assertEquals(expected.getTimeZone().getRawOffset(), actual.getTimeZone().getRawOffset());
Comparing the timezones is not needed IMO, Calendar internally stores stores the time in msec since the epoch, so comparing getTimeInMillis() is sufficient to declare two Calendars as pointing to the same time. For our tests, it's fine for the timezones to be different.