commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <>
Subject Re: [collection] Collections for primitives
Date Sat, 22 Jun 2002 22:28:33 GMT
On Sat, 22 Jun 2002, Stephen Colebourne wrote:
> I agree with Ola's views below. add()s should throw a ClassCastException.
> remove()s should be silent. queries should return false. The collection is
> just much easier to use that way. And all of this behaviour should be
> documented.

My biggest concern with Ola's views is that ignoring the incompatible
class being passed as an argument is (in my opinion) almost guarunteed
to be a programming error that will be masked, making debugging a
problem difficult.  Can you provide a use-case where such a behavior is
desirable and isn't a defect in the program (either a design defect or
an implementation defect)?  If I knew in what context the maps were
planning on being used where type-safety shouldn't be quite as strict,
then I'd have an easier time accepting a change in the behavior.


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

View raw message