diff --git a/src/main/java/org/jlib/container/storage/capacity/AbstractSplitCapacityStrategy.java b/src/main/java/org/jlib/container/storage/capacity/AbstractSplitCapacityStrategy.java index f251fa0b..add66547 100644 --- a/src/main/java/org/jlib/container/storage/capacity/AbstractSplitCapacityStrategy.java +++ b/src/main/java/org/jlib/container/storage/capacity/AbstractSplitCapacityStrategy.java @@ -38,12 +38,11 @@ protected AbstractSplitCapacityStrategy(final LinearIndexStorage storage, public void ensureSplitCapacity(final int splitIndex, final int splitCapacity) throws InvalidIndexException { ensureIndexValid(splitIndex); + ensureCapacityValid(splitCapacity); if (splitCapacity == 0) return; - ensureCapacityValid(splitCapacity); - safeEnsureSplitCapacity(splitIndex, splitCapacity); getContentIndexRange().incrementMaximum(splitCapacity);