Home / Vulnerability Database / Java : Method finalize() does not call super.finalize()
Java

Java : Method finalize() does not call super.finalize()

Classification

Overview

The finalize() method does not call super.finalize().

The finalize() method is defined in the Object Class and is called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.

The Java Language Specification states that it is a good practice for a finalize() method to call super.finalize(). Using super.finalize() and try-catch-finally block is a safety measure to ensure you do not unintentionally miss closing a resource used by the objects calling class.

LOW

DerScanner Severity Score

Do you want to fix Java : Method finalize() does not call super.finalize() in your application?

See also

Java

Java : Race condition

Java

Java : Text4Shell Vulnerability

Java

Java : JNI usage