From a52d741a41a3e0a85827f17024473f1fa8b64b9c Mon Sep 17 00:00:00 2001 From: Igor Akkerman Date: Wed, 11 Feb 2015 13:06:34 +0100 Subject: [PATCH] argument validation optimized --- .../storage/capacity/AbstractSplitCapacityStrategy.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 86530637..f251fa0b 100644 --- a/src/main/java/org/jlib/container/storage/capacity/AbstractSplitCapacityStrategy.java +++ b/src/main/java/org/jlib/container/storage/capacity/AbstractSplitCapacityStrategy.java @@ -39,11 +39,11 @@ 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);