commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <p...@steitz.com>
Subject Re: [collections] [PATCH] CompositeCollection class for Commons-Collections
Date Thu, 06 Nov 2003 22:38:11 GMT
Stephen Colebourne wrote:
> From: "Phil Steitz" <phil@steitz.com>
> 
>>Anyone have any objections to committing this to the decorators
> 
> subpackage?
> 
>>Phil
> 
> +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

Thoughts?

Phil

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