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

java.lang.Object.clone() spec typos

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: docs
    • Labels:
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5

      Description



      Name: ksC84122 Date: 12/29/98


      JavaDoc for java.lang.Object.clone() states ( Object.java 1.47 98/10/01):
      "...The precise meaning of "copy" may depend on the class of the object. The general
      intent is that, for any object x, the expression:
                x.clone() != x
           will be true, and that the expression:
                x.close.getClass() == x.getClass()
           will be true, but these are not absolute requirements. While it is typically the case that:
                x.close.equals(x)
           will be true, this is not an absolute requirement..."

      "x.close.getClass() == x.getClass()" needs to be replaced with "x.clone().getClass() == x.getClass()"
      "x.close.equals(x)" needs to be replaced with "x.clone().equals(x)"

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              asommere Alan Sommerer (Inactive)
              Reporter:
              ksoshals Kirill Soshalskiy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: