HHH-13416 Unguarded debug message being rendered in org.hibernate.engine.internal.Collections.processReachableCollection

This commit is contained in:
Sanne Grinovero 2019-05-27 16:12:39 +01:00
parent b7b8f44298
commit 4be05af86d
1 changed files with 6 additions and 4 deletions

View File

@ -167,10 +167,12 @@ public final class Collections {
final boolean isBytecodeEnhanced = persister.getOwnerEntityPersister().getInstrumentationMetadata().isEnhancedForLazyLoading();
if ( isBytecodeEnhanced && !collection.wasInitialized() ) {
// skip it
LOG.debugf(
"Skipping uninitialized bytecode-lazy collection: %s",
MessageHelper.collectionInfoString( persister, collection, ce.getCurrentKey(), session )
);
if ( LOG.isDebugEnabled() ) {
LOG.debugf(
"Skipping uninitialized bytecode-lazy collection: %s",
MessageHelper.collectionInfoString(persister, collection, ce.getCurrentKey(), session)
);
}
ce.setReached( true );
ce.setProcessed( true );
}