From bc14cade623f613615ce006c5d4bf58abee5f0c0 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Mon, 11 Jan 2016 10:06:45 +0100 Subject: [PATCH] KEYCLOAK-2278 NoSuchMethodError org.infinispan.Cache.entrySet() in EAP6 server overlay --- .../models/cache/infinispan/InfinispanUserCache.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanUserCache.java b/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanUserCache.java index c5e960c0e1..c08566b6d5 100755 --- a/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanUserCache.java +++ b/model/invalidation-cache/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanUserCache.java @@ -81,11 +81,8 @@ public class InfinispanUserCache implements UserCache { @Override public void invalidateRealmUsers(String realmId) { logger.tracev("Invalidating users for realm {0}", realmId); - for (Map.Entry u : cache.entrySet()) { - if (u.getValue().getRealm().equals(realmId)) { - cache.remove(u.getKey()); - } - } + + cache.clear(); } @Override