CWE-580—clone() Method Without super.clone()

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

Metadata

CWE ID:
CWE-580
摘要:
Variant
结构:
Simple
状态:
Draft
发布日期:
2006-12-15
更新日期:
2025-12-11

名称

clone() Method Without super.clone()

描述

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.

常见后果

范围:
Integrity, Other
影响:
Unexpected State, Quality Degradation

相关 CWE