Call System.currentTimeMillis() just once in SocialRequestManager.pruneExpired()

This commit is contained in:
mposolda 2013-08-16 13:04:15 +02:00
parent a65c8695d7
commit 38849d5eed

View file

@ -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 {