rspec/rules/S923/java/rule.adoc
2023-04-24 11:25:43 +02:00

21 lines
545 B
Plaintext

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
{
// ...
}
----
== See
* 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