commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun Thomas" <arun.tho...@paybytouch.com>
Subject RE: DO NOT REPLY [Bug 25154] New: - IteratorChain bug with empty iterators.
Date Thu, 04 Dec 2003 16:59:27 GMT
Folks, 

Anyone know how I, as a committer, go about getting a new password for CVS.  I've searched
through all my archives on multiple boxes and finally have come to the conclusion that I've
lost the email with my password.  

Help!

-AMT

-----Original Message-----
From: bugzilla@apache.org [mailto:bugzilla@apache.org] 
Sent: Tuesday, December 02, 2003 9:12 PM
To: commons-dev@jakarta.apache.org
Subject: DO NOT REPLY [Bug 25154] New: - IteratorChain bug with empty iterators.


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25154>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25154

IteratorChain bug with empty iterators.

           Summary: IteratorChain bug with empty iterators.
           Product: Commons
           Version: 2.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Collections
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: andrus-jk@objectstyle.org


Haven't tried this with nightly builds, but 2.1 collections have the follwoing
problem: when the first iterator in a chain is empty, first call to "hasNext" returns false,
on second and subsequent calls, "true" is returned again as it should. Here is an example:

        List emptyList = new ArrayList();
        List nonEmptyList = new ArrayList();
        nonEmptyList.add(new Object());
        
        IteratorChain it = new IteratorChain(new Iterator[] {emptyList.iterator(), nonEmptyList.iterator()});
        System.out.println("Next? " + it.hasNext()); // prints false
        System.out.println("Next again? " + it.hasNext()); // prints true

Cheers,
Andrus

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


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


Mime
View raw message