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

Calendar class description says getInstance returns GregorianCalendar

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • core-libs
    • None
    • beta2
    • generic
    • generic



      Name: nl37777 Date: 06/15/2001


      The class description of java.util.Calendar says that "Calendar's
      getInstance method returns a GregorianCalendar object". This is
      inconsistent with the getInstance methods themselves, which state in
      both return type and return value description that a Calendar is
      returned and therefore allow for instances of other subclasses of
      Calendar. The statement is also inconsistent with the intent of
      getInstance methods in locale-sensitive classes in general, which is to
      return appropriate objects for the specified locale, whether these
      objects are instances of publicly known subclasses are not.

      The class description should say that getInstance returns an instance of
      a locale-dependent subclass of Calendar.
      ======================================================================

            okutsu Masayoshi Okutsu
            nlindenbsunw Norbert Lindenberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: