Method can have varargs parameter
Reports methods that can be converted to variable arity methods.
Example:
void process(String name, Object[] objects);
After the quick-fix is applied:
void process(String name, Object... objects);
This inspection only reports if the language level of the project or module is 5 or higher.
Inspection options
Option | Type | Default |
---|---|---|
Ignore parameters with type byte[] or short[] | Checkbox | false |
Ignore all primitive array types | Checkbox | false |
Ignore methods overriding/implementing a super method | Checkbox | false |
Only report 'public' methods | Checkbox | false |
Ignore methods with multiple array parameters | Checkbox | false |
Ignore multidimensional array parameters | Checkbox | false |
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023