Inspectopedia Help

Manual array copy

Reports manual copying of array contents that can be replaced with a call to System.arraycopy().


for (int i = 0; i < array.length; i++) { newArray[i] = array[i]; }

After the quick-fix is applied:

System.arraycopy(array, 0, newArray, 0, array.length);

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023