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

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

Go to download

Sanity4J was created to simplify running multiple static code analysis tools on the Java projects. It provides a single entry point to run all the selected tools and produce a consolidated report, which presents all findings in an easily accessible manner.

The newest version!


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 - 2024 Weber Informatics LLC | Privacy Policy