Jtest logo




Contents  Previous  Next  Index

GC.FCF


Make sure that `finalize ()' calls `super.finalize ()'

Description

This rule flags code where a `finalize()' method does not call `super.finalize()'.

Example

 package GC;
 class FCF {
     protected void finalize () throws Throwable {
     }
 }

Repair

Add the call to `super.finalize()'. If that call is not made, the finalize methods of the superclasses will not be invoked. See the reference for a detailed explanation of why `super.finalize ()' should be called even if the base class doesn't define `finalize ()'.

Reference

Arnold, Ken, and Gosling, James The Java Programming Language. 2d ed. Addison Wesley, 1997, pp.49.


Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft