This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org
Difference between revisions of "Code Correctness: Erroneous finalize() Method"
From OWASP
(Reverting to last version not containing links to www.textpasricletoli.com) |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{template:CandidateForDeletion}} |
− | + | ||
+ | #REDIRECT [[Failure to follow guideline/specification]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' | Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' | ||
− | |||
− | |||
− | |||
− | |||
==Description== | ==Description== | ||
Line 28: | Line 29: | ||
==Related [[Attacks]]== | ==Related [[Attacks]]== | ||
− | |||
* [[Attack 1]] | * [[Attack 1]] | ||
* [[Attack 2]] | * [[Attack 2]] | ||
Line 34: | Line 34: | ||
==Related [[Vulnerabilities]]== | ==Related [[Vulnerabilities]]== | ||
− | |||
* [[Vulnerability 1]] | * [[Vulnerability 1]] | ||
* [[Vulnerabiltiy 2]] | * [[Vulnerabiltiy 2]] | ||
− | |||
− | |||
==Related [[Controls]]== | ==Related [[Controls]]== | ||
− | |||
* [[Control 1]] | * [[Control 1]] | ||
* [[Control 2]] | * [[Control 2]] | ||
− | |||
− | |||
− | |||
==Related [[Technical Impacts]]== | ==Related [[Technical Impacts]]== | ||
− | |||
* [[Technical Impact 1]] | * [[Technical Impact 1]] | ||
* [[Technical Impact 2]] | * [[Technical Impact 2]] | ||
Line 57: | Line 49: | ||
==References== | ==References== | ||
* [1] J. Gosling, B. Joy, G. Steele, G. Bracha. The Java Language Specification, Second Edition. Addison-Wesley, 2000. | * [1] J. Gosling, B. Joy, G. Steele, G. Bracha. The Java Language Specification, Second Edition. Addison-Wesley, 2000. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 18:27, 27 May 2009
#REDIRECT Failure to follow guideline/specification
Last revision (mm/dd/yy): 05/27/2009
[hide]
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
Related Vulnerabilities
Related Controls
Related Technical Impacts
References
- [1] J. Gosling, B. Joy, G. Steele, G. Bracha. The Java Language Specification, Second Edition. Addison-Wesley, 2000.