HHH-8087 - Cleanup

This commit is contained in:
Lukasz Antoniak 2013-03-22 16:02:47 +01:00
parent fa12131267
commit 03a56f58b9
2 changed files with 4 additions and 3 deletions

View File

@ -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();
}

View File

@ -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 );
}