Synopsis: | If you override finalize(), make it protected |
Language: | Java |
Severity Level: | 2 |
Category: | Finalizer |
Description: |
If you override finalize(), make it protected. If you make
it public, other classes may call it.public class Foo { public void finalize() { // do something } } |