From 6f953b26776fb2c7ab4dc0b78231c25a471540f4 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 24 Sep 2015 08:37:35 +1000 Subject: [PATCH] 478239 Remove pointless synchronize in infinispan scavenging --- .../session/infinispan/InfinispanSessionManager.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/jetty-infinispan/src/main/java/org/eclipse/jetty/session/infinispan/InfinispanSessionManager.java b/jetty-infinispan/src/main/java/org/eclipse/jetty/session/infinispan/InfinispanSessionManager.java index 6e79a2a4636..b2e898d05ad 100644 --- a/jetty-infinispan/src/main/java/org/eclipse/jetty/session/infinispan/InfinispanSessionManager.java +++ b/jetty-infinispan/src/main/java/org/eclipse/jetty/session/infinispan/InfinispanSessionManager.java @@ -654,14 +654,11 @@ public class InfinispanSessionManager extends AbstractSessionManager long now = System.currentTimeMillis(); LOG.info("SessionManager for context {} scavenging at {} ", getContextPath(getContext()), now); - synchronized (_sessions) + for (Map.Entry entry:_sessions.entrySet()) { - for (Map.Entry entry:_sessions.entrySet()) - { - long expiry = entry.getValue().getExpiry(); - if (expiry > 0 && expiry < now) - candidateIds.add(entry.getKey()); - } + long expiry = entry.getValue().getExpiry(); + if (expiry > 0 && expiry < now) + candidateIds.add(entry.getKey()); } for (String candidateId:candidateIds)