if ((sm != null) && (store != null))
{
topLevelState = new OutputObjectState(sm.get_uid(), sm.type());
if (writeToLog || (!store.fullCommitNeeded() &&
(sm.save_state(topLevelState, ObjectType.ANDPERSISTENT)) &&
(topLevelState.size() <= PersistenceRecord.MAX_OBJECT_SIZE)))
{
if (PersistenceRecord.classicPrepare)
{
OutputObjectState dummy = new OutputObjectState(Uid.nullUid(), null);