JDK-5029472 : spec for GregorianCalendar "field related" methods should be updated
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 2004-04-09
  • Updated: 2004-07-02
  • Resolved: 2004-07-02
Related Reports
Duplicate :  
Description

Name: sdR10048			Date: 04/09/2004


Filed By      : SPB JCK team (###@###.###)
JDK           : build 1.5.0-beta2-b46
JCK           : 1.5

Specification excerpt:
======================
--------- J2SE API spec v.1.5 ---------
...
(only for one method from the list)
public int getActualMaximum(int field)

Returns the maximum value that this calendar field could have, 
taking into consideration the given time value and the current 
values of the getFirstDayOfWeek, getMinimalDaysInFirstWeek, 
getGregorianChange and getTimeZone methods. For example, 
if the date of this instance is February 1, 2004, the actual maximum 
value of the DAY_OF_MONTH field is 29 because 2004 is a leap 
year, and if the date of this instance is February 1, 2005, it's 28. 

Overrides:
    getActualMaximum in class Calendar
Parameters:
    field - the calendar field 
Returns:
    the maximum of the given field for the time value of this GregorianCalendar

...
---------- end-of-excerpt ---------------

Problem description
===================
Specification for the designated methods does not describe the
expected behaviour in the case if the input param does not represent any
of Calendar fields.

The list is:
 void	add(int field, int amount) 
 int	getActualMaximum(int field) 
 int	getActualMinimum(int field) 
 int	getGreatestMinimum(int field) 
 int	getLeastMaximum(int field) 
 int	getMaximum(int field) 
 int	getMinimum(int field) 
 void	roll(int field, boolean up) 
 void	roll(int field, int amount) 


JCK test source location:
==========================
/java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests
    
======================================================================

Comments
EVALUATION Nine methods of java/util/Calendar do not specify the expected behaviour if the input parameter does not represent any Calendar field. ###@###.### 2004-04-12 This is a duplicate of 4737887. ###@###.### 2004-07-02
12-04-2004