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=24520>.
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=24520

[collections] IteratorChain.hasNext() throws when chain is empty

           Summary: [collections] IteratorChain.hasNext() throws when chain
                    is empty
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Collections
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If added to TestIteratorChain, the following test case fails with the stack
trace that follows.  The exception is documented in the javadoc for
IteratorChain.hasNext(), but the behavior may be inconsistent with the Iterator
interface spec.

Test case:

public void testEmptyChainHasNext() {
        IteratorChain chain = new IteratorChain();
        assertTrue(!chain.hasNext());      
    }

Stack trace:

[java] Time: 20.733
     [java] There was 1 error:
     [java] 1)
testEmptyChainHasNext(org.apache.commons.collections.iterators.TestIteratorChain)
java.lang.UnsupportedOperationException: IteratorChains must contain at least
one Iterator
     [java]     at
org.apache.commons.collections.iterators.IteratorChain.checkChainIntegrity(IteratorChain.java:248)
     [java]     at
org.apache.commons.collections.iterators.IteratorChain.lockChain(IteratorChain.java:256)
     [java]     at
org.apache.commons.collections.iterators.IteratorChain.hasNext(IteratorChain.java:295)
     [java]     at
org.apache.commons.collections.iterators.TestIteratorChain.testEmptyChainHasNext(TestIteratorChain.java:186)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to