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]



Reply via email to