rspec/rules/S1115/java/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

33 lines
770 B
Plaintext

== Why is this an issue?
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[]
'''
== Comments And Links
(visible only on this page)
=== 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.
endif::env-github,rspecator-view[]