-
Bug
-
Resolution: Fixed
-
P3
-
None
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."
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."
- relates to
-
JDK-8334546 [lworld] C2: Calling clone() on non-allocated inline types fails with "Should have been buffered"
- Resolved