{
dataManager.save(changesLog);
}
catch (JCRInvalidItemStateException e)
{
TransactionChangesLog normalizeChangesLog =
getNormalizedChangesLog(e.getIdentifier(), e.getState(), changesLog);
if (normalizeChangesLog != null)
{
saveChangesLog(normalizeChangesLog);
}
else
{
throw new RepositoryException(
"Collisions found during save of restore changes log, but caused item is not found by ID "
+ e.getIdentifier() + ". " + e, e);
}
}
catch (JCRItemExistsException e)
{
TransactionChangesLog normalizeChangesLog =
getNormalizedChangesLog(e.getIdentifier(), e.getState(), changesLog);
if (normalizeChangesLog != null)
{
saveChangesLog(normalizeChangesLog);
}