This finalize()
method should call super.finalize()
.
The Java Language Specification states that it is a good practice for a finalize()
method to call super.finalize()
[1].
Example 1: The following method omits the call to super.finalize()
.
protected void finalize() {
discardNative();
}
[1] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 568
[2] J. Gosling, B. Joy, G. Steele, G. Bracha The Java Language Specification, Second Edition Addison-Wesley