Issue #1555: Convert method with array parameter to vararg

Fixes `MethodCanBeVariableArityMethod` inspection violations.

Description:
>Reports methods with which can be converted to be a variable arity/varargs method, available in Java 5 and newer.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
This commit is contained in:
Michal Kordas 2015-08-29 23:33:46 +02:00 committed by Roman Ivanov
parent 0beb5abf9a
commit 1dcb4b201f
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ public class AllChecksTest extends BaseCheckTestSupport {
* @param array to check whether it is a subset.
* @param arrayToCheckIn array to check in.
*/
private static boolean isSubset(int[] array, int[] arrayToCheckIn) {
private static boolean isSubset(int[] array, int... arrayToCheckIn) {
Arrays.sort(arrayToCheckIn);
for (final int element : array) {
if (Arrays.binarySearch(arrayToCheckIn, element) < 0) {