HHH-8087 - Cleanup
This commit is contained in:
parent
fa12131267
commit
03a56f58b9
|
@ -122,10 +122,11 @@ public abstract class BaseEnversCollectionEventListener extends BaseEnversEventL
|
|||
}
|
||||
|
||||
/**
|
||||
* Forces persistent collection initialization.
|
||||
* @param event Collection event.
|
||||
* @return Initialized persistent collection.
|
||||
* @return Stored snapshot.
|
||||
*/
|
||||
protected Serializable getInitializedCollection(AbstractCollectionEvent event) {
|
||||
protected Serializable initializeCollection(AbstractCollectionEvent event) {
|
||||
event.getCollection().forceInitialization();
|
||||
return event.getCollection().getStoredSnapshot();
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class EnversPreCollectionRemoveEventListenerImpl
|
|||
Serializable oldColl = collectionEntry.getSnapshot();
|
||||
if ( !event.getCollection().wasInitialized() && shouldGenerateRevision( event ) ) {
|
||||
// In case of uninitialized collection we need a fresh snapshot to properly calculate audit data.
|
||||
oldColl = getInitializedCollection( event );
|
||||
oldColl = initializeCollection( event );
|
||||
}
|
||||
onCollectionAction( event, null, oldColl, collectionEntry );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue