Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5029472

spec for GregorianCalendar "field related" methods should be updated

XMLWordPrintable



      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
          
      ======================================================================

            okutsu Masayoshi Okutsu
            dsvsunw Dsv Dsv (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: