commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwomack <pwom...@papermule.co.uk>
Subject Re: [collections] bug in IteratorChain?
Date Tue, 02 Dec 2003 09:09:30 GMT
Stephen Colebourne wrote:
> I have a vague memory of something like this getting fixed once upon a time.
> Are you testing against the CVS version of this file or a release?

Oh darn.

It looks like there's a fundemental "nasty", which may require
thought to fix.

*my* fault is caused in  updateCurrentIterator(),
which returns IMMEDIATELY after setting
currentIterator = (Iterator) iteratorChain.get(0);

If this currentIterator is empty, IteratorChain.hasNext() will return
false, and it's all over.

But this "return" in updateCurrentIterator() was added as a result 
(between v1.2 and 1.3
http://cvs.apache.org/viewcvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/IteratorChain.java.diff?r1=1.2&r2=1.3&diff_format=h
  as result of a bug report:

"fix bug pointed out bu Jonathan Carlson
add test that demonstrates"

So I guess fixing one bug has caused another.

      BugBear


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message