commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <ggreg...@seagullsw.com>
Subject [collections] UnmodifiableSortedMap bug?
Date Wed, 29 Oct 2003 23:27:56 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message