rspec/rules/S923/java/rule.adoc

23 lines
578 B
Plaintext

== Why is this an issue?
As stated per effective java :
____
Varargs methods are a convenient way to define methods that require a variable number of arguments, but they should not be overused. They can produce confusing results if used inappropriately.
____
=== Noncompliant code example
[source,java]
----
void fun ( String... strings ) // Noncompliant
{
// ...
}
----
== Resources
* https://wiki.sei.cmu.edu/confluence/display/java/DCL57-J.+Avoid+ambiguous+overloading+of+variable+arity+methods[CERT, DCL57J] - Avoid ambiguous overloading of variable arity methods