KEYCLOAK-8462 Close delegates properly

This commit is contained in:
Hynek Mlnarik 2018-10-05 13:21:23 +02:00 committed by Hynek Mlnařík
parent 6fd4a02f95
commit 7f1c03a122

View file

@ -147,6 +147,9 @@ public class StoreFactoryCacheSession implements CachedStoreFactoryProvider {
} }
public void close() { public void close() {
if (delegate != null) {
delegate.close();
}
} }
private KeycloakTransaction getPrepareTransaction() { private KeycloakTransaction getPrepareTransaction() {
@ -193,10 +196,6 @@ public class StoreFactoryCacheSession implements CachedStoreFactoryProvider {
@Override @Override
public void commit() { public void commit() {
try { try {
if (getDelegate() == null) return;
if (clearAll) {
cache.clear();
}
runInvalidations(); runInvalidations();
transactionActive = false; transactionActive = false;
} finally { } finally {