Commit ce4b1c5a authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Applied Guus fix for #entrySet

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9558 b35dd754-fafc-0310-a699-88a17e54d16e
parent c7605c20
......@@ -385,14 +385,18 @@ public class DefaultCache<K, V> implements Cache<K, V> {
return false;
}
public Set entrySet() {
public Set<Entry<K, V>> entrySet() {
// First, clear all entries that have been in cache longer than the
// maximum defined age.
deleteExpiredEntries();
// TODO Make this work right
synchronized (this) {
return new HashSet(map.entrySet());
final Map<K, V> result = new HashMap<K, V>();
for (final Entry<K, DefaultCache.CacheObject<V>> entry : map.entrySet()) {
result.put(entry.getKey(), entry.getValue().object);
}
return result.entrySet();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment