Skip to content

Commit

Permalink
[hibernate#1517] Minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideD committed Mar 29, 2023
1 parent 3d21268 commit 3a71657
Showing 1 changed file with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,7 @@ protected CompletionStage<Void> deleteEntity(
final DeleteContext transientEntities) {

if ( LOG.isTraceEnabled() ) {
LOG.tracev(
"Deleting {0}",
infoString( persister, entityEntry.getId(), session.getFactory() )
);
LOG.tracev( "Deleting {0}", infoString( persister, entityEntry.getId(), session.getFactory() ) );
}

final PersistenceContext persistenceContext = session.getPersistenceContextInternal();
Expand All @@ -335,13 +332,8 @@ protected CompletionStage<Void> deleteEntity(
final Object[] deletedState = createDeletedState( persister, currentState, session );
entityEntry.setDeletedState( deletedState );

session.getInterceptor().onDelete(
entity,
entityEntry.getId(),
deletedState,
persister.getPropertyNames(),
propTypes
);
session.getInterceptor()
.onDelete( entity, entityEntry.getId(), deletedState, persister.getPropertyNames(), propTypes );

// before any callbacks, etc, so subdeletions see that this deletion happened first
persistenceContext.setEntryStatus( entityEntry, Status.DELETED );
Expand Down Expand Up @@ -409,7 +401,6 @@ private ReactiveActionQueue actionQueue(EventSource session) {
private Object[] createDeletedState(EntityPersister persister, Object[] currentState, EventSource session) {
Type[] propTypes = persister.getPropertyTypes();
final Object[] deletedState = new Object[propTypes.length];
// TypeFactory.deepCopy( currentState, propTypes, persister.getPropertyUpdateability(), deletedState, session );
boolean[] copyability = new boolean[propTypes.length];
java.util.Arrays.fill( copyability, true );
TypeHelper.deepCopy( currentState, propTypes, copyability, deletedState, session );
Expand Down

0 comments on commit 3a71657

Please sign in to comment.