diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java index fec7aea00a8b..1153f9d1f3f1 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java @@ -167,10 +167,12 @@ public static void processReachableCollection( 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 ); }