|
|
|
|
CWE-568: finalize() Method Without super.finalize()
| | finalize() Method Without super.finalize() |
|
| Weakness ID: 568 (Weakness Variant) | | Status: Draft |
Description
Description Summary The software contains a finalize() method that does not call super.finalize().
Extended Description The Java Language Specification states that it is a good practice for a finalize() method to call super.finalize().
Time of Introduction Common Consequences | Scope | Effect |
Other | Technical Impact: Quality degradation |
Demonstrative Examples Example 1 The following method omits the call to
super.finalize(). (Bad Code) Example
Language: Java protected void finalize() { } Potential Mitigations
Phase: Implementation Call the super.finalize() method. |
Phase: Testing Use static analysis tools to spot such issues in your code. |
Relationships Taxonomy Mappings | Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
| CERT Java Secure Coding | MET12-J | | Do not use finalizers |
Content History | Modifications |
|---|
| Modification Date | Modifier | Organization | Source |
|---|
| 2008-07-01 | Eric Dalci | Cigital | External | | updated Potential_Mitigations,
Time_of_Introduction | | 2008-09-08 | CWE Content Team | MITRE | Internal | | updated Relationships, Other_Notes | | 2009-10-29 | CWE Content Team | MITRE | Internal | | updated Description, Other_Notes | | 2011-06-01 | CWE Content Team | MITRE | Internal | | updated Common_Consequences, Relationships,
Taxonomy_Mappings | | 2011-06-27 | CWE Content Team | MITRE | Internal | | updated Common_Consequences | | 2012-05-11 | CWE Content Team | MITRE | Internal | | updated Relationships,
Taxonomy_Mappings | | 2012-10-30 | CWE Content Team | MITRE | Internal | | updated Potential_Mitigations | | Previous Entry Names |
|---|
| Change Date | Previous Entry
Name |
|---|
| 2008-04-11 | Erroneous Finalize
Method | |
|