@Override
    public boolean addAll(final int index, final Collection<? extends KVState> c) {
        checkNullElements(c);
        return super.addAll(index, c);
    }
You must first check to make sure that {@link #isSingletonList()}
returns true.
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/KVStateOutputList.java