Call System.currentTimeMillis() just once in SocialRequestManager.pruneExpired()
This commit is contained in:
parent
a65c8695d7
commit
38849d5eed
1 changed files with 2 additions and 1 deletions
|
@ -59,10 +59,11 @@ public class SocialRequestManager {
|
|||
}
|
||||
|
||||
private void pruneExpired() {
|
||||
long currentTime = System.currentTimeMillis();
|
||||
Iterator<Entry<String, Long>> itr = expires.entrySet().iterator();
|
||||
while (itr.hasNext()) {
|
||||
Entry<String, Long> e = itr.next();
|
||||
if (e.getValue() < System.currentTimeMillis()) {
|
||||
if (e.getValue() < currentTime) {
|
||||
itr.remove();
|
||||
map.remove(e.getKey());
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue