Make BoundedArrayList follow the old behavior.

Unit tests have been included.
This commit is contained in:
Tux
2016-01-10 20:15:40 -05:00
committed by md_5
parent aa214c0b54
commit a1895c556f
2 changed files with 78 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ public class BoundedArrayList<E> extends ArrayList<E>
private void checkSize(int increment)
{
Preconditions.checkState( size() + increment < maxSize, "Adding %s elements would exceed capacity of %s", increment, maxSize );
Preconditions.checkState( size() + increment <= maxSize, "Adding %s elements would exceed capacity of %s", increment, maxSize );
}
@Override