mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
SMACK-534 Refactored all System.out/err and printStackTrace calls with appropriate Java util logging calls.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_4_0@13887 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
9bb940da4b
commit
1b651d4939
30 changed files with 189 additions and 183 deletions
|
@ -22,6 +22,7 @@ package org.jivesoftware.smack.util;
|
|||
import org.jivesoftware.smack.util.collections.AbstractMapEntry;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* A specialized Map that is size-limited (using an LRU algorithm) and
|
||||
|
@ -49,7 +50,7 @@ import java.util.*;
|
|||
* @author Matt Tucker
|
||||
*/
|
||||
public class Cache<K, V> implements Map<K, V> {
|
||||
|
||||
private static Logger log = Logger.getLogger(Cache.class.getName());
|
||||
/**
|
||||
* The map the keys and values are stored in.
|
||||
*/
|
||||
|
@ -382,8 +383,7 @@ public class Cache<K, V> implements Map<K, V> {
|
|||
|
||||
while (expireTime > node.timestamp) {
|
||||
if (remove(node.object, true) == null) {
|
||||
System.err.println("Error attempting to remove(" + node.object.toString() +
|
||||
") - cacheObject not found in cache!");
|
||||
log.warning("Error attempting to remove(" + node.object.toString() + ") - cacheObject not found in cache!");
|
||||
// remove from the ageList
|
||||
node.remove();
|
||||
}
|
||||
|
@ -417,9 +417,7 @@ public class Cache<K, V> implements Map<K, V> {
|
|||
for (int i=map.size(); i>desiredSize; i--) {
|
||||
// Get the key and invoke the remove method on it.
|
||||
if (remove(lastAccessedList.getLast().object, true) == null) {
|
||||
System.err.println("Error attempting to cullCache with remove(" +
|
||||
lastAccessedList.getLast().object.toString() + ") - " +
|
||||
"cacheObject not found in cache!");
|
||||
log.warning("Error attempting to cullCache with remove(" + lastAccessedList.getLast().object.toString() + ") - cacheObject not found in cache!");
|
||||
lastAccessedList.getLast().remove();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue