HHH-13600 Unguarded log statement in CollectionCacheInvalidator

This commit is contained in:
Sanne Grinovero 2019-08-28 11:21:04 +01:00
parent 86e498f4f7
commit 9f71bd890d
1 changed files with 4 additions and 1 deletions

View File

@ -111,6 +111,7 @@ public class CollectionCacheInvalidator
return;
}
final EntityMetamodel entityMetamodel = persister.getEntityMetamodel();
final boolean debugEnabled = LOG.isDebugEnabled();
for ( String role : collectionRoles ) {
final CollectionPersister collectionPersister = metamodel.collectionPersister( role );
if ( !collectionPersister.hasCache() ) {
@ -142,7 +143,9 @@ public class CollectionCacheInvalidator
}
}
else {
LOG.debug( "Evict CollectionRegion " + role );
if ( debugEnabled ) {
LOG.debug( "Evict CollectionRegion " + role );
}
final CollectionDataAccess cacheAccessStrategy = collectionPersister.getCacheAccessStrategy();
final SoftLock softLock = cacheAccessStrategy.lockRegion();
session.getActionQueue().registerProcess( (success, session1) -> {