This vulnerability occurs when a Java class overrides the finalize() method but fails to call super.finalize() within it.
In Java, the finalize() method is called by the garbage collector before an object is destroyed. If you override this method in a subclass and omit the call to super.finalize(), you break the cleanup chain. This prevents the parent class from performing its own essential cleanup operations, which can lead to resource leaks like unclosed file handles or database connections. To prevent this, always include super.finalize() as the final action in your overridden finalize method. While modern Java development often recommends using cleaner alternatives like try-with-resources or AutoCloseable for resource management, maintaining the super.finalize() call remains a critical defensive practice in legacy code or when overriding finalize is unavoidable.
Impact: Quality Degradation
java