if (anonymousId != null && userManager.getAuthorizable(anonymousId) == null) {
userManager.createUser(anonymousId, null);
}
if (root.hasPendingChanges()) {
root.commit();
<BUG>}
} catch (RepositoryException e) {</BUG>
log.error(errorMsg, e);
throw new RuntimeException(e);
} catch (CommitFailedException e) {

if (anonymousId != null && userManager.getAuthorizable(anonymousId) == null) {
userManager.createUser(anonymousId, null);
}
if (root.hasPendingChanges()) {
root.commit();
}
builder.reset(store.getRoot());
} catch (RepositoryException e) {
log.error(errorMsg, e);
throw new RuntimeException(e);
} catch (CommitFailedException e) {
