commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: [collections] [PATCH] CompositeCollection class for Commons-Collections
Date Thu, 06 Nov 2003 22:38:11 GMT
Stephen Colebourne wrote:
> From: "Phil Steitz" <>
>>Anyone have any objections to committing this to the decorators
> subpackage?
> +1. The test needs work as its not a collections-testframework test.

I have reworked the test class to extend AbstractTestCollection and have 
run into a problem. The CompositeCollection interator method returns an 
IteratorChain.In the test class, I implemented makeCollection to return 
an empty CompositeCollection.  The verifies are failing because 
IteratorChain.hasNext() throws an UnsupportedOperationException when the 
chain is empty.

So the question is, what (if anything?) should change:
a) IteratorChain.hasNext() (return false when the chain is empty)
b) CompositeCollection.iterator() (return an emtpy non-chained iterator 
when the CompsiteCollection is empty)
c) No change



> Stephen
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message