From 007ab2f479504964e58d872012e264c21f66e872 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Sun, 23 Jun 2019 20:04:01 +0100 Subject: [PATCH] HHH-13452 Missing log level guard on formatting in DefaultPersistEventListener#entityIsDeleted --- .../event/internal/DefaultPersistEventListener.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultPersistEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultPersistEventListener.java index dfbb3ffab9..fedbc270fc 100755 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultPersistEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultPersistEventListener.java @@ -200,14 +200,16 @@ public class DefaultPersistEventListener final Object entity = source.getPersistenceContext().unproxy( event.getObject() ); final EntityPersister persister = source.getEntityPersister( event.getEntityName(), entity ); - LOG.tracef( + if ( LOG.isTraceEnabled() ) { + LOG.tracef( "un-scheduling entity deletion [%s]", MessageHelper.infoString( - persister, - persister.getIdentifier( entity, source ), - source.getFactory() + persister, + persister.getIdentifier( entity, source ), + source.getFactory() ) - ); + ); + } if ( createCache.put( entity, entity ) == null ) { justCascade( createCache, source, entity, persister );