Inspectopedia Help

Redundant array creation

Reports arrays that are created specifically to be passed as a varargs parameter.


Arrays.asList(new String[]{"Hello", "world"})

The quick-fix replaces the array initializer with individual arguments:

Arrays.asList("Hello", "world")

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023