All Downloads are FREE. Search and download functionalities are using the official Maven repository.

resources.report.rules.pmd.Finalizer_Rules.html Maven / Gradle / Ivy



Finalizer_Rules


Finalizer_Rules

alizer_Rules">

Finalizer Rules

  • EmptyFinalizer: If the finalize() method is empty, then it does not need to exist.
  • FinalizeOnlyCallsSuperFinalize: If the finalize() is implemented, it should do something besides just calling super.finalize().
  • FinalizeOverloaded: Methods named finalize() should not have parameters. It is confusing and probably a bug to overload finalize(). It will not be called by the VM.
  • FinalizeDoesNotCallSuperFinalize: If the finalize() is implemented, its last action should be to call super.finalize.
  • FinalizeShouldBeProtected: If you override finalize(), make it protected. If you make it public, other classes may call it.
  • AvoidCallingFinalize: Object.finalize() is called by the garbage collector on an object when garbage collection determines that there are no more references to the object.




  • © 2015 - 2025 Weber Informatics LLC | Privacy Policy