Well I've fixed it anyway :-) Stephen ----- Original Message ----- From: "__matthewHawthorne" <[EMAIL PROTECTED]> To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]> Sent: Wednesday, October 29, 2003 11:38 PM Subject: Re: [collections] UnmodifiableSortedMap bug?
> Looks like a bug to me. Perhaps we need some tests to prove that it > isn't doing what it's supposed to... then a fix to make it behave correctly. > > > > > Gary Gregory wrote: > > > Hello, > > > > Looking at UnmodifiableSortedMap, I see the following methods that look odd: > > > > public SortedMap subMap(Object fromKey, Object toKey) { > > SortedMap map = getSortedMap().subMap(fromKey, toKey); > > return new UnmodifiableSortedMap(getSortedMap()); > > } > > > > public SortedMap headMap(Object toKey) { > > SortedMap map = getSortedMap().headMap(toKey); > > return new UnmodifiableSortedMap(getSortedMap()); > > } > > > > public SortedMap tailMap(Object fromKey) { > > SortedMap map = getSortedMap().tailMap(fromKey); > > return new UnmodifiableSortedMap(getSortedMap()); > > } > > In each method, the local variable "map" is never used. > > > > ? > > > > Gary > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]