Skip to content

Commit

Permalink
argument validation optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
igorakkerman committed Feb 11, 2015
1 parent 9d49ae6 commit 49be344
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ protected AbstractSplitCapacityStrategy(final LinearIndexStorage<Item> 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);
Expand Down

0 comments on commit 49be344

Please sign in to comment.