-
Bug
-
Resolution: Not an Issue
-
P3
-
7
-
generic
-
generic
Problem Description from IBM:
The expectation that an exception be thrown contradicts all other behaviour of XMLGregorianCalendar where the user can set the values of fields in many ways where the value while they're editing may be invalid, for example setting the value of days = 31 in month 2 (i.e. Feburary 31st) before reassigning the month value to something else.
A user calling the methods individually,
XMLGregorianCalendar.setHour(24);
XMLGregorianCalendar.setMinute(0);
XMLGregorianCalendar.setSecond(1);
wouldn't get an exception.
XMLGregorianCalendar.setTime(24, 0, 1);
is just short-hand for that sequence of calls. It should behave the same way as all the other set() methods and not throw an exception.
The expectation that an exception be thrown contradicts all other behaviour of XMLGregorianCalendar where the user can set the values of fields in many ways where the value while they're editing may be invalid, for example setting the value of days = 31 in month 2 (i.e. Feburary 31st) before reassigning the month value to something else.
A user calling the methods individually,
XMLGregorianCalendar.setHour(24);
XMLGregorianCalendar.setMinute(0);
XMLGregorianCalendar.setSecond(1);
wouldn't get an exception.
XMLGregorianCalendar.setTime(24, 0, 1);
is just short-hand for that sequence of calls. It should behave the same way as all the other set() methods and not throw an exception.