Skip to content

Commit

Permalink
[#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 b0dfd77 commit 5277b33
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 5277b33

Please sign in to comment.