2023-05-03 11:06:20 +02:00
== Why is this an issue?
2021-06-08 14:23:48 +02:00
Overriding the Object.finalize() method should be done with caution and with a clear goal in mind so empty implementations or implementations containing only a call to 'super.finalize()' are useless and misleading.
The following code snippet illustrates this rule:
----
protected finalize() { //Non-Compliant
}
...
protected finalize() {
super.finalize(); //Non-Compliant
}
...
protected finalize() {
disposeSomeResources(); //Compliant
}
----
ifdef::env-github,rspecator-view[]
2021-06-08 15:52:13 +02:00
'''
2021-06-08 14:23:48 +02:00
== Comments And Links
(visible only on this page)
2023-05-25 14:18:12 +02:00
=== relates to: S1114
=== on 15 Oct 2013, 08:11:16 Freddy Mallet wrote:
Partially duplicates RSPEC-1114 so we're not going to implement this rule.
2021-06-08 14:23:48 +02:00
endif::env-github,rspecator-view[]