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

ID CWE-580
Abstraction Variant
Structure Simple
Status Draft
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.

Modes of Introduction

Phase Note
Implementation

Applicable Platforms

Type Class Name Prevalence
Language Java

Relationships

View Weakness
# ID View Status # ID Name Abstraction Structure Status
CWE-1000 Research Concepts Draft CWE-664 Improper Control of a Resource Through its Lifetime Pillar Simple Draft
CWE-1000 Research Concepts Draft CWE-573 Improper Following of Specification by Caller Class Simple Draft
Loading...
Loading...