Use cached policy store in Infinispan PolicyAdapter (#20566)

This commit is contained in:
Tomas Slusny 2023-05-29 15:39:24 +02:00 committed by GitHub
parent b41904bf04
commit 1b06c4cf6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,7 +206,7 @@ public class PolicyAdapter implements Policy, CachedModel<Policy> {
}
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);