Skip to content

Commit 4ba8b09

Browse files
committed
修复android 5.0 StackOverflow
1 parent b21559d commit 4ba8b09

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

library/src/com/lidroid/xutils/cache/KeyExpiryMap.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ public synchronized Long put(K key, Long expiryTimestamp) {
6767
@Override
6868
public synchronized boolean containsKey(Object key) {
6969
boolean result = false;
70-
if (super.containsKey(key)) {
71-
Long expiryTimestamp = super.get(key);
72-
if (expiryTimestamp != null && System.currentTimeMillis() < expiryTimestamp) {
73-
result = true;
74-
} else {
75-
this.remove(key);
76-
}
70+
Long expiryTimestamp = super.get(key);
71+
if (expiryTimestamp != null && System.currentTimeMillis() < expiryTimestamp) {
72+
result = true;
73+
} else {
74+
this.remove(key);
7775
}
7876
return result;
7977
}

0 commit comments

Comments
 (0)