CWE-580β€”clone() Method Without super.clone()

PUBLISHEDweakness record
released 2006-12-15 Β· last modified 2025-12-11

Metadata

CWE ID:
CWE-580
Abstraction:
Variant
Structure:
Simple
Status:
Draft
Release Date:
2006-12-15
Latest Modification Date:
2025-12-11

Weakness Name

clone() Method Without super.clone()

Description

The product contains a clone() method that does not call super.clone() to obtain the new object.

All implementations of clone() should obtain the new object by calling super.clone(). If a class does not follow this convention, a subclass's clone() method will return an object of the wrong type.

Common Consequences

Scope:
Integrity, Other
Impact:
Unexpected State, Quality Degradation

Related Weaknesses