HHH-12585 - Improve DefaultFlushEntityEventListener#invokeInterceptor method execution

This commit is contained in:
Andrea Boriero 2018-05-15 20:51:46 +01:00
parent ec75e9a26f
commit 9b00aaf9a5
1 changed files with 5 additions and 3 deletions

View File

@ -359,7 +359,11 @@ public class DefaultFlushEntityEventListener implements FlushEntityEventListener
}
}
final boolean answerFromInterceptor = session.getInterceptor().onFlushDirty(
if ( isDirty ) {
return true;
}
return session.getInterceptor().onFlushDirty(
entity,
entry.getId(),
values,
@ -367,8 +371,6 @@ public class DefaultFlushEntityEventListener implements FlushEntityEventListener
persister.getPropertyNames(),
persister.getPropertyTypes()
);
return answerFromInterceptor || isDirty;
}
private boolean copyState(Object entity, Type[] types, Object[] state, SessionFactory sf) {