--- jsr166/src/main/java/util/AbstractList.java 2006/04/19 15:07:14 1.8 +++ jsr166/src/main/java/util/AbstractList.java 2006/04/20 21:49:36 1.9 @@ -617,9 +617,9 @@ class SubList extends AbstractList int length; // Number of elements in this sublist SubList(AbstractList base, - AbstractList parent, - int baseIndex, - int fromIndex, + AbstractList parent, + int baseIndex, + int fromIndex, int toIndex) { if (fromIndex < 0) throw new IndexOutOfBoundsException("fromIndex = " + fromIndex); @@ -640,7 +640,7 @@ class SubList extends AbstractList * Returns an IndexOutOfBoundsException with nicer message */ private IndexOutOfBoundsException indexError(int index) { - return new IndexOutOfBoundsException("Index: " + index + + return new IndexOutOfBoundsException("Index: " + index + ", Size: " + length); } @@ -715,7 +715,7 @@ class SubList extends AbstractList } public List subList(int fromIndex, int toIndex) { - return new SubList(base, this, fromIndex + baseOffset, + return new SubList(base, this, fromIndex + baseOffset, fromIndex, toIndex); } @@ -750,7 +750,7 @@ class SubList extends AbstractList int cursor; // Current index int fence; // Upper bound on cursor int lastRet; // Index of returned element, or -1 - int expectedModCount; // Expected modCount of base + int expectedModCount; // Expected modCount of base SubListIterator(SubList list, int index) { this.lastRet = -1; @@ -861,7 +861,7 @@ class SubList extends AbstractList class RandomAccessSubList extends SubList implements RandomAccess { RandomAccessSubList(AbstractList base, - AbstractList parent, int baseIndex, + AbstractList parent, int baseIndex, int fromIndex, int toIndex) { super(base, parent, baseIndex, fromIndex, toIndex); }