From 1b06c4cf6cc2c8342723a1777c8492b6ccd127e9 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Mon, 29 May 2023 15:39:24 +0200 Subject: [PATCH] Use cached policy store in Infinispan PolicyAdapter (#20566) --- .../models/cache/infinispan/authorization/PolicyAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/authorization/PolicyAdapter.java b/model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/authorization/PolicyAdapter.java index e7cb5866cea1..0dfc41a15cd8 100644 --- a/model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/authorization/PolicyAdapter.java +++ b/model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/authorization/PolicyAdapter.java @@ -206,7 +206,7 @@ public Set getAssociatedPolicies() { } if (associatedPolicies != null) return associatedPolicies; associatedPolicies = new HashSet<>(); - PolicyStore policyStore = cacheSession.getPolicyStoreDelegate(); + PolicyStore policyStore = cacheSession.getPolicyStore(); String resourceServerId = cached.getResourceServerId(); for (String id : cached.getAssociatedPoliciesIds(modelSupplier)) { Policy policy = policyStore.findById(InfinispanCacheStoreFactoryProviderFactory.NULL_REALM, cacheSession.getResourceServerStore().findById(InfinispanCacheStoreFactoryProviderFactory.NULL_REALM, resourceServerId), id);