commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <>
Subject Re: [Collections] non-compatible changes
Date Fri, 22 Mar 2002 23:58:13 GMT
On Fri, 22 Mar 2002, James Strachan wrote:
> > It's not ideal, but it's a little late in the game to change it.  I've
> > updated the documentation to point out this behaviour.  (Also, the fact
> that
> > changes to the keySet() are reflected by the Map is in keeping with the
> > general contract for Map.)
> >
> > I would be willing to retract my -1 if you got buy-in from James and there
> > were no other objections.  However, if we're going to fix it, let's make
> it
> > agree with the Map contract.  Personally, changing it at this point makes
> me
> > uncomfortable, and I'd rather not do it.
> I kinda agree with you both ;-)
> I think ultimately BeanMap should be fixed to truly implement the Map
> interface if we can. Though the Collections package is built around the idea
> that not all operations need to be supported, so using unmodifiable
> collections for keySet() seems to make sense; especially as keys cannot be
> removed or added - only values can be updated.
> So I'd prefer keySet() to be unmodifiable and values() to be modifiable and
> reflected in the Map - if it can't be reflected easily (or until it gets
> implemented) then I'd prefer it to be unmodifiable as well for now. Its
> better for a feature to not be available than for it to be wrong.


Is this considered buy-in from James?  If so, I'll get to work
implementing this stuff and getting the changes in as quickly as possible.


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

View raw message