[kaffe] Re: LinkedList.subList severely broken

Daniel Bonniot Daniel.Bonniot at inria.fr
Wed May 21 10:26:01 PDT 2003


> 	LinkedListIterator(LinkedList list, int index) {
> 		super(list, index);
> 		elem = list.head;
>+		// Position elem to the index'th element.
>+		// We know that index is a valid index, because that was 
>+		// checked in the constructor in AbstractListIterator.
>+		for (; index > 0; index--)
>+		  elem = elem.next;
>

Maybe it would be simpler and more robust (but a little bit less 
efficient?) to just have:

 		super(list, index);
 		elem = list.get(index);

Which one is considered better?
Should I send a changelog entry too?

Daniel






More information about the kaffe mailing list