Skip to content

Commit

Permalink
HHH-8087 - Cleanup
Browse files Browse the repository at this point in the history
(cherry picked from commit 03a56f5)
  • Loading branch information
lukasz-antoniak committed Mar 22, 2013
1 parent 50f641a commit 2fb5a92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ protected final void onCollectionAction(
}

/**
* 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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void onPreRemoveCollection(PreCollectionRemoveEvent event) {
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 );
}
Expand Down

0 comments on commit 2fb5a92

Please sign in to comment.