// and it will be appended to {@code from} and {@code to}
if (newFromLength < oldFromLength) {
from = Arrays.copyOfRange(from, 0, newFromLength);
to = Arrays.copyOfRange(to, 0, newFromLength);
} else if (newFromLength > oldFromLength) {
int[] toAdd = list.toArray();
from = Arrays.copyOfRange(from, 0, newFromLength);
to = Arrays.copyOfRange(to, 0, newFromLength);
System.arraycopy(toAdd, 0, from, oldFromLength, toAdd.length);
System.arraycopy(toAdd, 0, to, oldFromLength, toAdd.length);
}