replaceInPlace of ArrayList can sort null