diff --git a/rules/S1113/java/rule.adoc b/rules/S1113/java/rule.adoc index 9c20924ecb6..42b72a2c543 100644 --- a/rules/S1113/java/rule.adoc +++ b/rules/S1113/java/rule.adoc @@ -23,13 +23,16 @@ More unexpected issues can be caused by relying on the `finalize()` method to pe public class MyClass { @Override - protected void finalize() { - releaseSomeResources(); // Noncompliant + protected void finalize() { // Noncompliant + releaseSomeResources(); } } ---- +=== Exceptions + +It is allowed to override the `finalize()` method as `final` method with an empty body, to prevent the _finalizer attack_ as described in _MET12-J-EX1_. == Resources