commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25154] - [collections] IteratorChain bug with empty iterators.
Date Thu, 04 Dec 2003 17:11:17 GMT
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

[collections] IteratorChain bug with empty iterators.

apacheBugzilla@AMammenT.cotse.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID
            Summary|IteratorChain bug with empty|[collections] IteratorChain
                   |iterators.                  |bug with empty iterators.



------- Additional Comments From apacheBugzilla@AMammenT.cotse.net  2003-12-04 17:11 -------
A test for this bug (below) in TestIteratorChain has been present since 
version 1.3 of the testcase (currently on version 1.6).  It looks like to 
checks the same condition you point out and it does pass in the current 
build.  Please take a look and reopen the bug if there's a difference I've 
missed.  

    public void testFirstIteratorIsEmptyBug() {
        List empty = new ArrayList();
        List notEmpty = new ArrayList();
        notEmpty.add("A");
        notEmpty.add("B");
        notEmpty.add("C");
        IteratorChain chain = new IteratorChain();
        chain.addIterator(empty.iterator());
        chain.addIterator(notEmpty.iterator());
        assertTrue("should have next",chain.hasNext());
        assertEquals("A",chain.next());
        assertTrue("should have next",chain.hasNext());
        assertEquals("B",chain.next());
        assertTrue("should have next",chain.hasNext());
        assertEquals("C",chain.next());
        assertTrue("should not have next",!chain.hasNext());
    }

---------------------------------------------------------------------
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