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

clone() in java.util.Calendar aliases internal arrays causing all clones to be c

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 1.1
    • core-libs
    • x86
    • windows_nt



      Name: mc57594 Date: 01/29/97


      java.util.Calendar has two array members called fields and isSet.
      The clone() method simply calls super.clone(), and does not copy the arrays.
      This causes the arrays to be aliased. Ergo, all clones shared the same instances
      as their progenitor, and are therefore corrupt. GregorianCalendar inherits this bug.
      ======================================================================

            nlindenbsunw Norbert Lindenberg (Inactive)
            mchamnessunw Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: