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

Value classes implementing Cloneable

XMLWordPrintable

      A value class is trivially Cloneable if it implements Cloneable; returning the same value.
      The implementation should not throw CloneNotSupported for value objects if the class implements Cloneable.

      The \@ImplSpec for Object.clone mentions specific behavior for arrays and should also mention value objects.:

      "If the class of the object implements Cloneable, {@code Object.clone()} returns the same value."

            fparain Frederic Parain
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: