Code Correctness: Erroneous finalize() Method

Last revision (mm/dd/yy): //

Vulnerabilities Table of Contents

ASDR Table of Contents

Description
This finalize method does not call super.finalize.

The Java Language Specification states that it is a good practice for a finalize method to call super.finalize.[1] The statement above is not completely correct. The Java Language Specification 3.0 section 12.6.1 states: "This should always be done, unless it is the programmer's intent to nullify the actions of the finalizer in the superclass."

Risk Factors
TBD

Examples
The following method omits the call to super.finalize.

protected void finalize { discardNative; }

Related Attacks

 * Attack 1
 * Attack 2

Related Vulnerabilities

 * Vulnerability 1
 * Vulnerabiltiy 2

Note: the contents of "Related Problems" sections should be placed here

Related Controls

 * Control 1
 * Control 2

Note: contents of "Avoidance and Mitigation" and "Countermeasure" related Sections should be placed here

Related Technical Impacts

 * Technical Impact 1
 * Technical Impact 2