rspec/rules/S3681/java/rule.adoc

38 lines
596 B
Plaintext

Using a type parameter when you don't have to simply obfuscates the code. Inserting an unnecessary type parameter in an unparameterized method call will compile, but confuse maintainers.
== Noncompliant Code Example
----
void doTheThing() {
// ...
}
//...
this.<String>doTheThing(); // Noncompliant
----
== Compliant Solution
----
void doTheThing() {
// ...
}
//...
this.doTheThing();
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::highlighting.adoc[]
endif::env-github,rspecator-view[]